Index: newgrf.c =================================================================== --- newgrf.c (revision 4572) +++ newgrf.c (working copy) @@ -1446,6 +1446,17 @@ break; } + /* Deterministic Word-Size Sprite Group */ + case 0x85: // Self scope, byte + case 0x86: // Parent scope, byte + /* Deterministic Doubleword-Size Sprite Group */ + case 0x89: // Self scope, byte + case 0x8A: // Parent scope, byte + { + grfmsg(GMS_WARN, "NewSpriteGroup (0x%02X:0x%02X): No support for deterministic sprite groups using word/doubleword variables, skipping.", setid, type); + break; + } + default: { RealSpriteGroup *rg; @@ -1453,6 +1464,8 @@ byte num_loading = grf_load_byte(&buf); uint i; + check_length(bufend - buf, (num_loaded + num_loading) * 2, "NewSpriteGroup"); + if (_cur_grffile->spriteset_start == 0) { grfmsg(GMS_ERROR, "NewSpriteGroup: No sprite set to work on! Skipping."); return;