about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--subx/038---literal_strings.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/subx/038---literal_strings.cc b/subx/038---literal_strings.cc
index 407470ff..72534697 100644
--- a/subx/038---literal_strings.cc
+++ b/subx/038---literal_strings.cc
@@ -77,11 +77,11 @@ void add_global_to_data_segment(const string& name, const word& value, segment&
 
 void test_instruction_with_string_literal() {
   parse_instruction_character_by_character(
-      "a \"abc  def\\nwee\" z\n"  // two spaces inside string
+      "a \"abc  \\\"def\\nwee\" z\n"  // two spaces inside string
   );
   CHECK_TRACE_CONTENTS(
       "parse2: word: a\n"
-      "parse2: word: \"abc  def\\nwee\"\n"
+      "parse2: word: \"abc  \"def\\nwee\"\n"
       "parse2: word: z\n"
   );
   // no other words
@@ -126,12 +126,12 @@ void parse_instruction_character_by_character(const string& line_data, vector<li
         if (c == '\\') {
           in >> c;
           if (c == 'n') d << '\n';
-          else if (c == 't') d << '\t';
           else if (c == '"') d << '"';
           else {
             raise << "parse_instruction_character_by_character: unknown escape sequence '\\" << c << "'\n" << end();
             return;
           }
+          continue;
         } else {
           d << c;
         }