Merge branch 'bugfix/clear_values_in_str_resetfn' into 'release/v4.3'

Clear values in string reset function

See merge request espressif/esp-idf!25322
This commit is contained in:
Jiang Jiang Jian 2023-09-04 14:25:05 +08:00
commit f96b93cac1

View File

@ -3615,6 +3615,9 @@ TRexBool trex_getsubexp(TRex* exp, int n, TRexMatch *subexp)
static void arg_str_resetfn(struct arg_str *parent) static void arg_str_resetfn(struct arg_str *parent)
{ {
ARG_TRACE(("%s:resetfn(%p)\n", __FILE__, parent)); ARG_TRACE(("%s:resetfn(%p)\n", __FILE__, parent));
for (int i = 0; i < parent->count; i++) {
parent->sval[i] = "";
}
parent->count = 0; parent->count = 0;
} }