Commit b54bfa5c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Tollef Fog Heen

Missing errorchecks incompilation of regsub()

Fixes #1125
parent d499461f
......@@ -454,6 +454,8 @@ vcc_Eval_Regsub(struct vcc *tl, struct expr **e, const struct symbol *sym)
SkipToken(tl, '(');
vcc_expr0(tl, &e2, STRING);
if (e2 == NULL)
return;
if (e2->fmt != STRING)
vcc_expr_tostring(&e2, STRING);
......@@ -467,6 +469,8 @@ vcc_Eval_Regsub(struct vcc *tl, struct expr **e, const struct symbol *sym)
SkipToken(tl, ',');
vcc_expr0(tl, &e2, STRING);
if (e2 == NULL)
return;
if (e2->fmt != STRING)
vcc_expr_tostring(&e2, STRING);
*e = vcc_expr_edit(STRING, "\v1, \v2)", *e, e2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment