- avoid using plain char pointers to store script data for FraggleScript.

This commit is contained in:
Christoph Oelckers 2020-04-11 12:12:22 +02:00
commit 3db56651f4
11 changed files with 37 additions and 44 deletions

View file

@ -264,7 +264,8 @@ bool FScriptLoader::ParseInfo(MapData * map)
}
auto th = Level->CreateThinker<DFraggleThinker>();
th->LevelScript->data = copystring(scriptsrc.GetChars());
th->LevelScript->Data.Resize((unsigned)scriptsrc.Len() + 1);
memcpy(th->LevelScript->Data.Data(), scriptsrc.GetChars(), scriptsrc.Len() + 1);
Level->FraggleScriptThinker = th;
if (drownflag==-1) drownflag = (Level->maptype != MAPTYPE_DOOM || fsglobal);