about summary refs log tree commit diff stats
path: root/subx/022check_instruction.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-26 23:26:20 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-26 23:26:20 -0700
commit5fdd09c5f012037b3a0f67ae63597d0135c1fe39 (patch)
treeca690c0bf2ca3f5e67f396509ed89d4c4632b785 /subx/022check_instruction.cc
parent365f762f8ffe2596b538aa9da711b36806126899 (diff)
downloadmu-5fdd09c5f012037b3a0f67ae63597d0135c1fe39.tar.gz
4432
Good idea from @tekknolagi: make more explicit that the first segment is
code.
Diffstat (limited to 'subx/022check_instruction.cc')
-rw-r--r--subx/022check_instruction.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/subx/022check_instruction.cc b/subx/022check_instruction.cc
index 19a7bece..93087b9a 100644
--- a/subx/022check_instruction.cc
+++ b/subx/022check_instruction.cc
@@ -67,9 +67,9 @@ Transform.push_back(check_operands);
 :(code)
 void check_operands(/*const*/ program& p) {
   if (p.segments.empty()) return;
-  const segment& seg = p.segments.at(0);
-  for (int i = 0;  i < SIZE(seg.lines);  ++i) {
-    check_operands(seg.lines.at(i));
+  const segment& code = p.segments.at(0);
+  for (int i = 0;  i < SIZE(code.lines);  ++i) {
+    check_operands(code.lines.at(i));
     if (trace_contains_errors()) return;  // stop at the first mal-formed instruction
   }
 }