Skip to content

Commit

Permalink
Replace string with char[] (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerethk authored Nov 19, 2024
1 parent 82c6ec7 commit 22c3e8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TheForceEngine/TFE_DarkForces/generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace TFE_DarkForces
Wax* wax;
JBool active;

string logicName; // JK: added to store a custom logic name
char logicName[256]; // JK: added to store a custom logic name
};

void generatorTaskFunc(MessageType msg)
Expand Down Expand Up @@ -118,7 +118,7 @@ namespace TFE_DarkForces

// Search the externally defined logics for a match
TFE_ExternalData::CustomActorLogic* customLogic;
customLogic = tryFindCustomActorLogic(gen->logicName.c_str());
customLogic = tryFindCustomActorLogic(gen->logicName);
if (customLogic && gameSettings->df_jsonAiLogics)
{
obj_setCustomActorLogic(spawn, customLogic);
Expand Down Expand Up @@ -236,7 +236,7 @@ namespace TFE_DarkForces
memset(generator, 0, sizeof(Generator));

generator->type = genType;
generator->logicName = string(logicName);
strncpy(generator->logicName, logicName, 255);
generator->active = 1;
generator->delay = 0;

Expand Down

0 comments on commit 22c3e8d

Please sign in to comment.