about summary refs log tree commit diff stats
path: root/subx/011run.cc
diff options
context:
space:
mode:
Diffstat (limited to 'subx/011run.cc')
-rw-r--r--subx/011run.cc13
1 files changed, 9 insertions, 4 deletions
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
       }