From cd8395323b06575c38c09092cc03a19a844b65ef Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 30 Sep 2018 23:18:55 -0700 Subject: 4627 --- subx/011run.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'subx') diff --git a/subx/011run.cc b/subx/011run.cc index b7cf280f..7a63c159 100644 --- a/subx/011run.cc +++ b/subx/011run.cc @@ -148,13 +148,18 @@ void parse(istream& fin, program& out) { if (word_data == ".") continue; // comment token if (word_data == "==") { flush(out, l); - segment s; string segment_title; lin >> segment_title; - if (starts_with(segment_title, "0x")) + if (starts_with(segment_title, "0x")) { + segment s; s.start = parse_int(segment_title); - trace(99, "parse") << "new segment from " << HEXWORD << s.start << end(); - out.segments.push_back(s); + trace(99, "parse") << "new segment from 0x" << HEXWORD << s.start << end(); + out.segments.push_back(s); + } + else { + trace(99, "parse") << "new segment " << segment_title << end(); + out.segments.push_back(segment()); + } // todo? break; // skip rest of line } -- cgit 1.4.1-2-gfad0