From 6eacf7b8046e8f399fea7ab93d8534b8f100ce0a Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sun, 1 Mar 2009 22:47:07 +0000 Subject: [PATCH] fix bounds checks in MyCompiler::initLocalsFromLogicalIp --- src/compiler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler.cpp b/src/compiler.cpp index 0874b95516..820a1ee339 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -4993,15 +4993,15 @@ class MyCompiler: public Compiler { c.locals = newLocals; Event* e = c.logicalCode[logicalIp]->firstEvent; - for (unsigned i = 0; i < c.localFootprint; ++i) { + for (int i = 0; i < static_cast(c.localFootprint); ++i) { Local* local = e->localsBefore + i; if (local->value) { initLocal(1, i); - unsigned highOffset = c.arch->bigEndian() ? 1 : -1; + int highOffset = c.arch->bigEndian() ? 1 : -1; if (i + highOffset > 0 - and i + highOffset < c.localFootprint + and i + highOffset < static_cast(c.localFootprint) and local->value->high == local[highOffset].value) { c.locals[i].value->high = c.locals[i + highOffset].value;