G_UpdateTimeStickerMedals: Put an actual message on the sticker where an invalid medal ghost tag is handled

Fixes a function reshuffling error that would have put control flow back in a loop with invalid properties
This commit is contained in:
toaster 2023-02-05 19:25:23 +00:00
parent e7b63a5fad
commit d1c7a90a7c

View file

@ -552,8 +552,10 @@ bademblem:
{ {
if (emblem->tag > mapheaderinfo[map]->ghostCount if (emblem->tag > mapheaderinfo[map]->ghostCount
|| mapheaderinfo[map]->ghostBrief[emblem->tag-1] == NULL) || mapheaderinfo[map]->ghostBrief[emblem->tag-1] == NULL)
goto bademblem; snprintf(stickermedalinfo.targettext, 9, "Invalid ghost tag");
else if (mapheaderinfo[map]->ghostBrief[emblem->tag-1]->time == UINT32_MAX)
snprintf(stickermedalinfo.targettext, 9, "Ghost DNF");
else
stickermedalinfo.timetoreach = mapheaderinfo[map]->ghostBrief[emblem->tag-1]->time; stickermedalinfo.timetoreach = mapheaderinfo[map]->ghostBrief[emblem->tag-1]->time;
} }
} }