diff options
author | axel <axel@liljencrantz.se> | 2006-06-01 01:40:28 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-06-01 01:40:28 +1000 |
commit | 4722ddc373a4a0ec4f84a75dff4140625d03707f (patch) | |
tree | 942c7d1e516c2c6a4c7e033ce5fb7bad19be3998 /parser.c | |
parent | 25365dbc54361422b5a8a1d56f30ab48bdb34381 (diff) |
Increase size of buffer for parser error string. Should change this to a dynamically allocated string.
darcs-hash:20060531154028-ac50b-ada120ecfe65bcf1ad1b3d1a5fad41ae9dec133c.gz
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -252,6 +252,10 @@ The fish parser. Contains functions for parsing code. #define UNKNOWN_BLOCK _( L"unknown/invalid block" ) +/** + Size of the error string buffer +*/ +#define ERR_STR_SZ 1024 /** Last error code */ int error_code; @@ -262,7 +266,7 @@ event_block_t *global_event_block=0; static int err_pos; /** Description of last error */ -static wchar_t err_str[256]; +static wchar_t err_str[ERR_STR_SZ]; /** Pointer to the current tokenizer */ static tokenizer *current_tokenizer; @@ -698,7 +702,7 @@ void error( int ec, int p, const wchar_t *str, ... ) err_pos = p; va_start( va, str ); - vswprintf( err_str, 256, str, va ); + vswprintf( err_str, ERR_STR_SZ, str, va ); va_end( va ); } |