From: Alan Modra Date: Tue, 9 Mar 2010 00:41:24 +0000 (+0000) Subject: PR gas/11356 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4199fe1239b2fdbbf552f85524e0f9dafd61e100;p=binutils-gdb.git PR gas/11356 * listing.c (listing_newline): Correct backslash quote logic. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index cd9149d39b2..a4f73008b0d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2010-03-09 Alan Modra + + PR gas/11356 + * listing.c (listing_newline): Correct backslash quote logic. + 2010-03-08 Rainer Orth * config/tc-i386.h [TE_SOLARIS] (ELF_TARGET_FORMAT): Define. diff --git a/gas/listing.c b/gas/listing.c index 9a71c76354e..002b3c59586 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;