Commit 72836c0b authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

winedbg: Fix check for register number (coverity).

parent 4704e783
......@@ -1547,7 +1547,7 @@ static enum packet_return packet_write_register(struct gdb_context* gdbctx)
assert(gdbctx->in_trap);
reg = strtoul(gdbctx->in_packet, &ptr, 16);
if (ptr == NULL || reg > cpu_num_regs || *ptr++ != '=')
if (ptr == NULL || reg >= cpu_num_regs || *ptr++ != '=')
{
if (gdbctx->trace & GDBPXY_TRC_COMMAND_ERROR)
fprintf(stderr, "Invalid register index %s\n", gdbctx->in_packet);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment