mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-29 05:41:02 +00:00
Fix M_FindResponseFile returning garbage data
This commit is contained in:
parent
650e0eafce
commit
5af778ba7f
1 changed files with 3 additions and 4 deletions
|
@ -198,17 +198,16 @@ void M_FindResponseFile(void)
|
||||||
k++;
|
k++;
|
||||||
} while (k < size);
|
} while (k < size);
|
||||||
|
|
||||||
free(file);
|
|
||||||
|
|
||||||
for (k = 0; k < pindex; k++)
|
for (k = 0; k < pindex; k++)
|
||||||
myargv[indexinfile++] = moreargs[k];
|
myargv[indexinfile++] = moreargs[k];
|
||||||
myargc = indexinfile;
|
myargc = indexinfile;
|
||||||
|
|
||||||
// display arguments
|
// display arguments
|
||||||
CONS_Printf(M_GetText("%d command-line args:\n"), myargc);
|
CONS_Printf(M_GetText("%d command-line args:\n"), myargc-1); // -1 so @ don't actually get counted for
|
||||||
for (k = 1; k < myargc; k++)
|
for (k = 1; k < myargc; k++)
|
||||||
CONS_Printf("%s\n", myargv[k]);
|
CONS_Printf("%s\n", myargv[k]);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
free(file); // Needs to be called after everything else, or we would end up with garbage data
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue