diff options
Diffstat (limited to 'edify')
-rw-r--r-- | edify/main.c | 3 | ||||
-rw-r--r-- | edify/yydefs.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/edify/main.c b/edify/main.c index a2b74ad92..855704385 100644 --- a/edify/main.c +++ b/edify/main.c @@ -42,11 +42,12 @@ int expect(const char* expr_str, const char* expected, int* errors) { State state; state.cookie = NULL; - state.script = expr_str; + state.script = strdup(expr_str); state.errmsg = NULL; result = Evaluate(&state, e); free(state.errmsg); + free(state.script); if (result == NULL && expected != NULL) { fprintf(stderr, "error evaluating \"%s\"\n", expr_str); ++*errors; diff --git a/edify/yydefs.h b/edify/yydefs.h index 625786255..aca398fb8 100644 --- a/edify/yydefs.h +++ b/edify/yydefs.h @@ -33,4 +33,6 @@ typedef struct { } \ } while (0) +int yylex(); + #endif |