aboutsummaryrefslogtreecommitdiff
path: root/gas/macro.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2002-11-11 08:42:52 +0000
committerHans-Peter Nilsson <hp@axis.com>2002-11-11 08:42:52 +0000
commit9df59bba97f148fbc5b85735cad107fddcf16ee4 (patch)
tree288131ff6137bc6bb2a80d87f1a3dc153c354272 /gas/macro.c
parentdaa3eaaf8ca9e7e317ecd725f6ea841d1f4aac7b (diff)
downloadgdb-9df59bba97f148fbc5b85735cad107fddcf16ee4.zip
gdb-9df59bba97f148fbc5b85735cad107fddcf16ee4.tar.gz
gdb-9df59bba97f148fbc5b85735cad107fddcf16ee4.tar.bz2
* macro.c (get_any_string): Correct logic for not going beyond end
of in->ptr[].
Diffstat (limited to 'gas/macro.c')
-rw-r--r--gas/macro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/macro.c b/gas/macro.c
index 0842431..3f2aaf6 100644
--- a/gas/macro.c
+++ b/gas/macro.c
@@ -366,7 +366,7 @@ get_any_string (idx, in, out, expand, pretend_quoted)
if (idx < in->len)
{
- if (in->len > 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx]))
+ if (in->len > idx + 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx]))
{
while (!ISSEP (in->ptr[idx]))
sb_add_char (out, in->ptr[idx++]);