aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-06-01 01:40:28 +1000
committerGravatar axel <axel@liljencrantz.se>2006-06-01 01:40:28 +1000
commit4722ddc373a4a0ec4f84a75dff4140625d03707f (patch)
tree942c7d1e516c2c6a4c7e033ce5fb7bad19be3998 /parser.c
parent25365dbc54361422b5a8a1d56f30ab48bdb34381 (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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/parser.c b/parser.c
index 6e58b54b..82946929 100644
--- a/parser.c
+++ b/parser.c
@@ -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 );
}