This patch fix the compare for the list size and the register index.
Change-Id: I36d5e078f57d2a9f7823cfdf0d537762e00f6929
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/516
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
if (retval != ERROR_OK)
return gdb_error(connection, retval);
- if (reg_list_size < reg_num) {
+ if (reg_list_size <= reg_num) {
LOG_ERROR("gdb requested a non-existing register");
return ERROR_SERVER_REMOTE_CLOSED;
}