mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Fix infinite loop in OSD_StripColors() when trying to display a quote containing '^' not followed by a number.
This fixes Mission 2 of Platoon Leader, as reported by RunningDuke. git-svn-id: https://svn.eduke32.com/eduke32@6478 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
486791b3ee
commit
2c7840d928
1 changed files with 9 additions and 2 deletions
|
@ -146,13 +146,20 @@ const char * OSD_StripColors(char *outBuf, const char *inBuf)
|
|||
if (*inBuf == '^')
|
||||
{
|
||||
if (isdigit(*(inBuf+1)))
|
||||
{
|
||||
inBuf += 2 + !!isdigit(*(inBuf+2));
|
||||
continue;
|
||||
}
|
||||
else if ((Btoupper(*(inBuf+1)) == 'O'))
|
||||
{
|
||||
inBuf += 2;
|
||||
continue;
|
||||
}
|
||||
else if ((Btoupper(*(inBuf+1)) == 'S') && isdigit(*(inBuf+2)))
|
||||
{
|
||||
inBuf += 3;
|
||||
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
*(outBuf++) = *(inBuf++);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue