valgrind: always terminate options

This commit is contained in:
Enno Rehling 2017-02-06 11:52:07 +01:00
parent 2267373b2e
commit baf3275eba

View file

@ -112,6 +112,9 @@ static void rc_setoption(race *rc, int key, const char *value) {
assert(i<MAXOPTIONS || !"MAXOPTIONS too small for race"); assert(i<MAXOPTIONS || !"MAXOPTIONS too small for race");
v = rc->options->value+i; v = rc->options->value+i;
rc->options->key[i] = key; rc->options->key[i] = key;
if (i+1<MAXOPTIONS) {
rc->options->key[i+1]=RCO_NONE;
}
} }
} }
assert(v); assert(v);