|
|
|
@@ -103,7 +103,8 @@ parse_alist( const char *s ) |
|
|
|
|
|
|
|
char *pair = (char*)malloc( l + 1 ); |
|
|
|
|
|
|
|
if ( c[ strlen( c ) - 1 ] == ' ' ) |
|
|
|
/* remove trailing space */ |
|
|
|
if ( c[ l - 1 ] == ' ' ) |
|
|
|
--l; |
|
|
|
|
|
|
|
strncpy( pair, c, l ); |
|
|
|
@@ -122,8 +123,13 @@ parse_alist( const char *s ) |
|
|
|
if ( *v == '"' ) |
|
|
|
{ |
|
|
|
// v++; |
|
|
|
v[ strlen( v ) - 1 ] = '\0'; |
|
|
|
memmove( v, v + 1, strlen( v ) + 1 ); |
|
|
|
if ( v[ strlen( v ) - 1 ] != '"' ) |
|
|
|
printf( "error: invalid quoting in log entry!\n" ); |
|
|
|
else |
|
|
|
{ |
|
|
|
v[ strlen( v ) - 1 ] = '\0'; |
|
|
|
memmove( v, v + 1, strlen( v ) + 1 ); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|