1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-09 23:28:06 -05:00

More sensible (and also more idiomatic) bounds checking on esc_args.

[originally from svn r9027]
This commit is contained in:
Simon Tatham 2010-12-07 00:21:42 +00:00
parent 0fc1f78677
commit d0d647b965

View File

@ -3290,8 +3290,8 @@ static void term_out(Terminal *term)
}
term->termstate = SEEN_CSI;
} else if (c == ';') {
if (++term->esc_nargs <= ARGS_MAX)
term->esc_args[term->esc_nargs - 1] = ARG_DEFAULT;
if (term->esc_nargs < ARGS_MAX)
term->esc_args[term->esc_nargs++] = ARG_DEFAULT;
term->termstate = SEEN_CSI;
} else if (c < '@') {
if (term->esc_query)