Host_Loadgame_f: don't break when there are } characters in quoted strings. Fixes issue loading savegames from retrojam1_skacky

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1145 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Eric Wasylishen 2014-12-08 19:30:21 +00:00
parent fd219279f4
commit 6afd1e5286

View file

@ -1055,13 +1055,18 @@ void Host_Loadgame_f (void)
entnum = -1; // -1 is the globals
while (!feof(f))
{
qboolean inside_string = false;
for (i = 0; i < (int) sizeof(str) - 1; i++)
{
r = fgetc (f);
if (r == EOF || !r)
break;
str[i] = r;
if (r == '}')
if (r == '"')
{
inside_string = !inside_string;
}
else if (r == '}' && !inside_string) // only handle } characters outside of quoted strings
{
i++;
break;