Can now load maps with extra lines at the end, as found in some mods in the wild

This commit is contained in:
yairm210 2021-12-28 23:33:52 +02:00
parent 9266ddc5d0
commit 2ea97edb92

View File

@ -16,7 +16,7 @@ object MapSaver {
fun mapFromSavedString(mapString: String, checkSizeErrors: Boolean = true): TileMap {
val unzippedJson = try {
Gzip.unzip(mapString)
Gzip.unzip(mapString.trim())
} catch (ex: Exception) {
mapString
}