aboutsummaryrefslogtreecommitdiff
path: root/gas/listing.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/listing.c')
-rw-r--r--gas/listing.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gas/listing.c b/gas/listing.c
index c8b6d63..d1c291c 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -342,7 +342,7 @@ listing_newline (char *ps)
int seen_quote = 0;
int seen_slash = 0;
- for (copy = input_line_pointer - 1;
+ for (copy = input_line_pointer;
*copy && (seen_quote
|| is_end_of_line [(unsigned char) *copy] != 1);
copy++)
@@ -353,13 +353,13 @@ listing_newline (char *ps)
seen_quote = ! seen_quote;
}
- len = (copy - input_line_pointer) + 2;
+ len = copy - input_line_pointer + 1;
copy = (char *) xmalloc (len);
if (copy != NULL)
{
- char *src = input_line_pointer - 1;
+ char *src = input_line_pointer;
char *dest = copy;
while (--len)