pc trace bug fix

This commit is contained in:
Fredrik Osterlind 2012-01-26 15:33:45 +01:00
parent a7deb906e7
commit 1abb3b46b2
1 changed files with 2 additions and 2 deletions

View File

@ -172,7 +172,7 @@ public class MSP430 extends MSP430Core {
}
if (trace != null) {
trace[tracePos++] = pc;
if (tracePos > trace.length)
if (tracePos >= trace.length)
tracePos = 0;
}
}
@ -258,7 +258,7 @@ public class MSP430 extends MSP430Core {
execCounter[pc]++;
}
if (trace != null) {
if (tracePos > trace.length) {
if (tracePos >= trace.length) {
tracePos = 0;
}
trace[tracePos++] = pc;