public: crtlib: add quotation mark support for ParseFile, required for filesystem_stdio

This commit is contained in:
Alibek Omarov
2022-07-11 00:34:48 +03:00
parent fc132e87f4
commit 5350d88f57
8 changed files with 32 additions and 18 deletions

View File

@@ -889,11 +889,14 @@ COM_ParseFile
text parser
==============
*/
char *_COM_ParseFileSafe( char *data, char *token, const int size, unsigned int flags, int *plen )
char *COM_ParseFileSafe( char *data, char *token, const int size, unsigned int flags, int *plen, qboolean *quoted )
{
int c, len = 0;
qboolean overflow = false;
if( quoted )
*quoted = false;
if( !token || !size )
{
if( plen ) *plen = 0;
@@ -927,6 +930,9 @@ skipwhite:
// handle quoted strings specially
if( c == '\"' )
{
if( quoted )
*quoted = true;
data++;
while( 1 )
{