mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-11 04:27:49 -05:00
vt: bug: fix lazy initialization of sub parameter value (off-by-one)
This commit is contained in:
parent
9b74cedb20
commit
0c5a19f950
1 changed files with 1 additions and 2 deletions
3
vt.c
3
vt.c
|
|
@ -887,8 +887,7 @@ action(struct terminal *term, enum action _action, uint8_t c)
|
|||
term->vt.params.v[term->vt.params.idx - 1].sub.value[0] = 0;
|
||||
} else if (c == ':') {
|
||||
struct vt_param *param = &term->vt.params.v[term->vt.params.idx - 1];
|
||||
param->sub.idx++;
|
||||
param->sub.value[param->sub.idx] = 0;
|
||||
param->sub.value[param->sub.idx++] = 0;
|
||||
} else {
|
||||
assert(term->vt.params.idx >= 0);
|
||||
struct vt_param *param = &term->vt.params.v[term->vt.params.idx - 1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue