mirror of https://github.com/contiki-ng/mspsim
pc trace bug fix
This commit is contained in:
parent
a7deb906e7
commit
1abb3b46b2
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue