Skip to content

Commit

Permalink
- Blood: Replace use of non-standard strupr() from 754554a with an …
Browse files Browse the repository at this point in the history
…FString object.
  • Loading branch information
mjr4077au committed Jul 25, 2021
1 parent 3b82a08 commit 9fad44b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/games/blood/src/nnexts.cpp
Expand Up @@ -3239,15 +3239,15 @@ bool condCmp(int val, int arg1, int arg2, int comOp) {

void condError(XSPRITE* pXCond, const char* pzFormat, ...) {

char buffer[256]; char buffer2[512]; char condType[32] = "Unknown";
char buffer[256]; char buffer2[512]; FString condType = "Unknown";
for (int i = 0; i < 7; i++) {
if (pXCond->data1 < gCondTypeNames[i].rng1 || pXCond->data1 >= gCondTypeNames[i].rng2) continue;
sprintf(condType, gCondTypeNames[i].name);
strupr(condType);
condType = gCondTypeNames[i].name;
condType.ToUpper();
break;
}

sprintf(buffer, "\n\n%s CONDITION RX: %d, TX: %d, SPRITE: #%d RETURNS:\n", condType, pXCond->rxID, pXCond->txID, pXCond->reference);
sprintf(buffer, "\n\n%s CONDITION RX: %d, TX: %d, SPRITE: #%d RETURNS:\n", condType.GetChars(), pXCond->rxID, pXCond->txID, pXCond->reference);
va_list args;
va_start(args, pzFormat);
vsprintf(buffer2, pzFormat, args);
Expand Down

0 comments on commit 9fad44b

Please sign in to comment.