about summary refs log tree commit diff stats
path: root/subx/023check_operand_sizes.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-26 09:02:06 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-26 09:03:13 -0700
commitd5f75ffe86abcd6c59e02f0a59c0e4d3d73d8f70 (patch)
tree4c5ffaac6f2851018c7499413e9b7471e8528985 /subx/023check_operand_sizes.cc
parentb2e36ec82782b40c34bf181a82bd518b8943cb66 (diff)
downloadmu-d5f75ffe86abcd6c59e02f0a59c0e4d3d73d8f70.tar.gz
4419
Unshadow variable. Thanks Max Bernstein for pointing this out.
Diffstat (limited to 'subx/023check_operand_sizes.cc')
-rw-r--r--subx/023check_operand_sizes.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/subx/023check_operand_sizes.cc b/subx/023check_operand_sizes.cc
index cec625af..8ad3b1aa 100644
--- a/subx/023check_operand_sizes.cc
+++ b/subx/023check_operand_sizes.cc
@@ -30,8 +30,8 @@ void check_operand_bounds(/*const*/ program& p) {
   const segment& seg = p.segments.at(0);
   for (int i = 0;  i < SIZE(seg.lines);  ++i) {
     const line& inst = seg.lines.at(i);
-    for (int i = first_operand(inst);  i < SIZE(inst.words);  ++i)
-      check_operand_bounds(inst.words.at(i));
+    for (int j = first_operand(inst);  j < SIZE(inst.words);  ++j)
+      check_operand_bounds(inst.words.at(j));
     if (trace_contains_errors()) return;  // stop at the first mal-formed instruction
   }
 }