Increase size of buffer for parser error string. Should change this to a dynamically allocated string.

darcs-hash:20060531154028-ac50b-ada120ecfe65bcf1ad1b3d1a5fad41ae9dec133c.gz
This commit is contained in:
axel
2006-06-01 01:40:28 +10:00
parent 25365dbc54
commit 4722ddc373
2 changed files with 12 additions and 6 deletions

View File

@@ -547,9 +547,10 @@ void debug( int level, const wchar_t *msg, ... )
sb_init( &sb );
sb_init( &sb2 );
va_start( va, msg );
sb_printf( &sb, L"%ls: ", program_name );
va_start( va, msg );
sb_vprintf( &sb, msg, va );
va_end( va );
@@ -581,7 +582,7 @@ void write_screen( const wchar_t *msg, string_buffer_t *buff )
*/
while( *pos && ( !wcschr( L" \n\r\t", *pos ) ) )
{
/*
Check is token is wider than one line.
If so we mark it as an overflow and break the token.
@@ -606,7 +607,7 @@ void write_screen( const wchar_t *msg, string_buffer_t *buff )
else if( overflow )
{
/*
In case of overflow, we print a newline, except if we alreade are at position 0
In case of overflow, we print a newline, except if we already are at position 0
*/
wchar_t *token = wcsndup( start, pos-start );
if( line_width != 0 )
@@ -630,6 +631,7 @@ void write_screen( const wchar_t *msg, string_buffer_t *buff )
free( token );
line_width += (line_width!=0?1:0) + tok_width;
}
/*
Break on end of string
*/