aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1998-11-17 21:44:22 +0000
committerNick Clifton <nickc@redhat.com>1998-11-17 21:44:22 +0000
commit3b0ae6963658e0691c2a471f5c6a33b1dfacbf16 (patch)
treeb4e443e4554ab598146e4fb578e2527cb3d3ae9e /gas
parent73e42a0da89d6521448d0a0c0822a897360e3a98 (diff)
downloadgdb-3b0ae6963658e0691c2a471f5c6a33b1dfacbf16.zip
gdb-3b0ae6963658e0691c2a471f5c6a33b1dfacbf16.tar.gz
gdb-3b0ae6963658e0691c2a471f5c6a33b1dfacbf16.tar.bz2
PR17074 - ignore line terminator characters found inside strings.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/listing.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index fe11ca7..b147d18 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+Tue Nov 17 13:42:42 1998 Nick Clifton <nickc@cygnus.com>
+
+ * listing.c: Ignore line terminator characters found inside
+ strings.
+
start-sanitize-fr30
Thu Nov 12 19:21:24 1998 Dave Brolley <brolley@cygnus.com>
diff --git a/gas/listing.c b/gas/listing.c
index 5050ad7..d6bac78 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -355,11 +355,13 @@ listing_newline (ps)
{
char * copy;
int len;
+ int seen_quote = 0;
for (copy = input_line_pointer - 1;
- * copy && ! is_end_of_line [* copy];
+ * copy && (seen_quote || (! is_end_of_line [* copy]));
copy ++)
- continue;
+ if (* copy == '"' && copy[-1] != '\')
+ seen_quote = ! seen_quote;
len = (copy - input_line_pointer) + 2;