From 379d667655e4fbd2aa3cdcf25704469de9ad165e Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 11 Apr 2014 16:13:08 +0200 Subject: [PATCH] orcmips: Fix register range check There are 32 possible registers and not 33 CID #1146987 --- orc/orcmips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orc/orcmips.c b/orc/orcmips.c index d2d26ae..81c4182 100644 --- a/orc/orcmips.c +++ b/orc/orcmips.c @@ -73,7 +73,7 @@ orc_mips_reg_name (int reg) "$gp", "$sp", "$fp", "$ra" }; - if (reg < ORC_GP_REG_BASE || reg > ORC_GP_REG_BASE + 32) + if (reg < ORC_GP_REG_BASE || reg >= ORC_GP_REG_BASE + 32) return "ERROR"; return regs[reg-32]; -- 2.7.4