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 5dd57715dd
commit a59aaf6af9
2 changed files with 2 additions and 1 deletions

View file

@ -327,7 +327,7 @@ set(PACKAGE "libwebsockets")
set(CPACK_PACKAGE_NAME "${PACKAGE}")
set(CPACK_PACKAGE_VERSION_MAJOR "4")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "3")
set(CPACK_PACKAGE_VERSION_PATCH "4")
set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_GENERATOR "RPM")
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")

View file

@ -938,6 +938,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 */