target/riscv: fix checking of number of parameters
in command 'riscv resume_order' to prevent segfault on issuing the command without a parameter. Change-Id: I5d7f4f92c2fa8e9effaba2c000d111e491b7b64f Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/9132 Tested-by: jenkins
This commit is contained in:
@@ -4825,7 +4825,7 @@ COMMAND_HANDLER(riscv_set_ir)
|
||||
|
||||
COMMAND_HANDLER(riscv_resume_order)
|
||||
{
|
||||
if (CMD_ARGC > 1)
|
||||
if (CMD_ARGC != 1)
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
|
||||
if (!strcmp(CMD_ARGV[0], "normal")) {
|
||||
|
||||
Reference in New Issue
Block a user