Skip to content

Commit

Permalink
Fixes edge case in TMX2BIN
Browse files Browse the repository at this point in the history
  • Loading branch information
theNestruo committed Feb 6, 2023
1 parent c560e1d commit f8acb58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Version history

* 06/02/2023 v3.3.1
* Fixes edge case in `TMX2BIN`
* 29/01/2023 v3.3
* Block count output in `PNG2MSX`
* 11/01/2023 v3.2
Expand Down
2 changes: 1 addition & 1 deletion src/readtmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ int tmxReaderRead(struct stTmxReader *this, FILE *file, struct stTiled *tiled) {
goto out;
}
val = atoi(token);
if (val < 256) {
if (val - 1 < 256) {
*dest = (byte) (val - 1);

} else if (this->isMultibankCharset) {
Expand Down

0 comments on commit f8acb58

Please sign in to comment.