Fix tokens.c missing-error-code bug.
This commit is contained in:
parent
d36f1bf162
commit
c0ad4481bd
|
@ -137,6 +137,7 @@ struct Slice *nf_tokenize(const char *input, struct Error *err)
|
||||||
|
|
||||||
if(parens != 0){
|
if(parens != 0){
|
||||||
err->context = malloc(sizeof(char) * ERR_LEN);
|
err->context = malloc(sizeof(char) * ERR_LEN);
|
||||||
|
err->code = MISMATCHED_PARENS;
|
||||||
int start = i > ERR_LEN ? i - ERR_LEN : 0;
|
int start = i > ERR_LEN ? i - ERR_LEN : 0;
|
||||||
strncpy(err->context, &input[start], ERR_LEN);
|
strncpy(err->context, &input[start], ERR_LEN);
|
||||||
free(slices);
|
free(slices);
|
||||||
|
|
Loading…
Reference in New Issue