From 25641251484987b205dbe2cfc1511be1440165cc Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Wed, 22 Aug 2012 04:16:58 +0000 Subject: [PATCH] - Fixed: Crash when trying to swap fragglescript special when specials 272 and 270 aren't in the translation array. SVN r3830 (trunk) --- src/fragglescript/t_load.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fragglescript/t_load.cpp b/src/fragglescript/t_load.cpp index 850d61769..d9b4f2d04 100644 --- a/src/fragglescript/t_load.cpp +++ b/src/fragglescript/t_load.cpp @@ -342,7 +342,7 @@ void T_LoadScripts(MapData *map) // the default translator is being used. // Custom translators will not be patched. if ((gameinfo.gametype == GAME_Doom || gameinfo.gametype == GAME_Heretic) && level.info->Translator.IsEmpty() && - level.maptype == MAPTYPE_DOOM && SimpleLineTranslations[272 - 2*HasScripts].special == FS_Execute) + level.maptype == MAPTYPE_DOOM && SimpleLineTranslations.Size() > 272 && SimpleLineTranslations[272 - 2*HasScripts].special == FS_Execute) { FLineTrans t = SimpleLineTranslations[270]; SimpleLineTranslations[270] = SimpleLineTranslations[272];