From e4ab7dde8656f7e4f71b79daac7896ffc8c0597f Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Mon, 14 Dec 2020 22:06:01 -0700 Subject: [PATCH] Fix loading custom floors with junk in their modifier's high nybble --- js/format-c2g.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/format-c2g.js b/js/format-c2g.js index 1376196..390553e 100644 --- a/js/format-c2g.js +++ b/js/format-c2g.js @@ -1050,7 +1050,7 @@ export function parse_level(buf, number = 1) { } else if (name instanceof Array) { // Custom floors and walls are one of several options, chosen by modifier - name = name[modifier]; + name = name[modifier % name.length]; } let type = TILE_TYPES[name];