1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

strexp: reset out offset each time

A second strexp mustn't inherit the offset of the first, completed one
This commit is contained in:
Andy Green 2020-04-30 20:26:19 +01:00
parent fa7c86951c
commit 71e4b4118e

View file

@ -947,6 +947,7 @@ lws_strexp_expand(lws_strexp_t *exp, const char *in, size_t len,
if (*in == '{') {
exp->state = LWS_EXPS_NAME_OR_CLOSE;
exp->name_pos = 0;
exp->exp_ofs = 0;
break;
}
/* treat as a literal */