Fix error in quote parsing of log entries.

This commit is contained in:
Jonathan Moore Liles 2008-04-26 21:45:24 -05:00
parent 8e1bc189e6
commit 82ada52b71
2 changed files with 11 additions and 4 deletions

View File

@ -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 );
}
}
}

View File

@ -390,10 +390,11 @@ Region::handle ( int m )
_fade_in.type = (Fade::fade_type_e)(int)(r - &menu[2]);
else if ( r > &menu[7] && r < &menu[12] )
_fade_out.type = (Fade::fade_type_e)(int)(r - &menu[8]);
redraw();
}
return 1;
}
else
return Sequence_Widget::handle( m );