From 5fdd09c5f012037b3a0f67ae63597d0135c1fe39 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Thu, 26 Jul 2018 23:26:20 -0700 Subject: 4432 Good idea from @tekknolagi: make more explicit that the first segment is code. --- subx/022check_instruction.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'subx/022check_instruction.cc') 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 } } -- cgit 1.4.1-2-gfad0