summaryrefslogtreecommitdiff
path: root/gas/listing.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2010-03-09 00:41:23 +0000
committerAlan Modra <amodra@bigpond.net.au>2010-03-09 00:41:23 +0000
commit2beb2d03564b85a4ef417efa13cef31c20e055c4 (patch)
tree08884174508412ab9415961d7fb7d4eb90857fd4 /gas/listing.c
parent42177527d53cff3c9bc3270cd5eaf122f02d4c6f (diff)
downloadbinutils-redhat-2beb2d03564b85a4ef417efa13cef31c20e055c4.tar.gz
PR gas/11356
* listing.c (listing_newline): Correct backslash quote logic.
Diffstat (limited to 'gas/listing.c')
-rw-r--r--gas/listing.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gas/listing.c b/gas/listing.c
index 9a71c76354..002b3c5958 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -347,10 +347,12 @@ listing_newline (char *ps)
|| is_end_of_line [(unsigned char) *copy] != 1);
copy++)
{
- if (*copy == '\\')
- seen_slash = ! seen_slash;
- else if (*copy == '"' && seen_slash)
- seen_quote = ! seen_quote;
+ if (seen_slash)
+ seen_slash = 0;
+ else if (*copy == '\\')
+ seen_slash = 1;
+ else if (*copy == '"')
+ seen_quote = !seen_quote;
}
len = copy - input_line_pointer + 1;