Fix crash
This commit is contained in:
parent
7601985f32
commit
09e565e431
@ -252,11 +252,12 @@ namespace Components
|
||||
Utils::IO::WriteFile(Utils::String::VA("raw/%s.ents", name.data()), asset.mapEnts->entityString, true);
|
||||
}
|
||||
|
||||
static std::string mapEntities;
|
||||
FileSystem::File ents(name + ".ents");
|
||||
if (ents.exists())
|
||||
{
|
||||
static auto mapEntities = ents.getBuffer();
|
||||
asset.mapEnts->entityString = const_cast<char*>(mapEntities.data());
|
||||
mapEntities = ents.getBuffer();
|
||||
asset.mapEnts->entityString = mapEntities.data();
|
||||
asset.mapEnts->numEntityChars = mapEntities.size() + 1;
|
||||
}
|
||||
}
|
||||
|
@ -1983,7 +1983,7 @@ namespace Game
|
||||
struct __declspec(align(4)) MapEnts
|
||||
{
|
||||
const char *name;
|
||||
char *entityString;
|
||||
const char *entityString;
|
||||
int numEntityChars;
|
||||
MapTriggers trigger;
|
||||
Stage *stages;
|
||||
|
Loading…
Reference in New Issue
Block a user