Avoid crashing on invalid lines during config file conversion.

This commit is contained in:
Alexandre Julliard 2001-01-05 22:23:37 +00:00
parent f6c7222fce
commit 550ba5b47a
1 changed files with 7 additions and 4 deletions

View File

@ -332,11 +332,14 @@ static int convert_config( FILE *in, const char *output_name )
p++;
}
fprintf( out, "\" = \"" );
while (*p2)
if (p2)
{
if (*p2 == '\\') fputc( '\\', out );
fputc( *p2, out );
p2++;
while (*p2)
{
if (*p2 == '\\') fputc( '\\', out );
fputc( *p2, out );
p2++;
}
}
fprintf( out, "\"\n" );
}