X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=gas%2Fmacro.c;h=de6b4172ec292316acf2c5dff8ef8811649e4a94;hb=ebe2334ee6cb065d2a86688bc9558d62320dd459;hp=a1a2323c5e2d47f0004038bcecdd855047915fcc;hpb=827041555ac443bd57340060f3e034fd7b199dd8;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/macro.c b/gas/macro.c index a1a2323c5e..de6b4172ec 100644 --- a/gas/macro.c +++ b/gas/macro.c @@ -1,5 +1,5 @@ /* macro.c - macro support for gas - Copyright (C) 1994-2019 Free Software Foundation, Inc. + Copyright (C) 1994-2020 Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, sac@cygnus.com @@ -223,14 +223,13 @@ buffer_and_nest (const char *from, const char *to, sb *ptr, anyway, there's not an obviously better fix here. */ if (strncasecmp (ptr->ptr + i, "linefile", 8) == 0) { - char *saved_input_line_pointer = input_line_pointer; char saved_eol_char = ptr->ptr[ptr->len]; ptr->ptr[ptr->len] = '\0'; - input_line_pointer = ptr->ptr + i + 8; + temp_ilp (ptr->ptr + i + 8); s_app_line (0); + restore_ilp (); ptr->ptr[ptr->len] = saved_eol_char; - input_line_pointer = saved_input_line_pointer; ptr->len = line_start; } } @@ -285,8 +284,8 @@ getstring (size_t idx, sb *in, sb *acc) { int nest = 0; idx++; - while ((in->ptr[idx] != '>' || nest) - && idx < in->len) + while (idx < in->len + && (in->ptr[idx] != '>' || nest)) { if (in->ptr[idx] == '!') { @@ -369,13 +368,13 @@ get_any_string (size_t idx, sb *in, sb *out) { if (in->len > idx + 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx])) { - while (!ISSEP (in->ptr[idx])) + while (idx < in->len && !ISSEP (in->ptr[idx])) sb_add_char (out, in->ptr[idx++]); } else if (in->ptr[idx] == '%' && macro_alternate) { offsetT val; - char buf[20]; + char buf[64]; /* Turns the next expression into a string. */ /* xgettext: no-c-format */