diff --git a/src/acs/call-funcs.cpp b/src/acs/call-funcs.cpp index f35dd5198..fb84264c9 100644 --- a/src/acs/call-funcs.cpp +++ b/src/acs/call-funcs.cpp @@ -159,7 +159,7 @@ static bool ACS_GetSpriteFromString(const char *word, spritenum_t *type) for (int i = 0; i < NUMSPRITES; i++) { - if (fastcmp(word, sprnames[i])) + if (fastncmp(word, sprnames[i], 4)) { *type = static_cast(i); return true; @@ -2529,7 +2529,9 @@ bool CallFunc_GetThingProperty(ACSVM::Thread *thread, const ACSVM::Word *argV, A #define PROP_SPR(x, y) \ case x: \ { \ - value = static_cast( ~env->getString( sprnames[ mobj->y ] )->idx ); \ + char crunched[5] = {0}; \ + strncpy(crunched, sprnames[ mobj->y ], 4); \ + value = static_cast( ~env->getString( crunched )->idx ); \ break; \ }