Make strtok_quote treat the character following \ as a normal character.

This commit is contained in:
Hallvard Furuseth 1999-02-23 15:40:18 +00:00
parent b0250a119f
commit 6b40ed4882
2 changed files with 9 additions and 2 deletions

View File

@ -603,7 +603,11 @@ strtok_quote( char *line, char *sep )
break;
case '\\':
SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
if ( next[1] ) {
SAFEMEMCPY( next,
next + 1, strlen( next + 1 ) + 1 );
next++; /* dont parse the escaped character */
}
break;
default:

View File

@ -177,7 +177,10 @@ strtok_quote(
break;
case '\\':
SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
if ( next[1] ) {
SAFEMEMCPY( next, next + 1, strlen( next + 1 ) + 1 );
next++; /* dont parse the escaped character */
}
break;
default: