aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-microblaze.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-microblaze.c')
-rw-r--r--gas/config/tc-microblaze.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index e1c4953..7c6357e 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -807,11 +807,13 @@ md_assemble (char * str)
/* Find the op code end. */
for (op_start = op_end = str;
- * op_end && nlen < 20 && !is_end_of_line [(int)*op_end] && *op_end != ' ';
+ *op_end && !is_end_of_line[(unsigned char) *op_end] && *op_end != ' ';
op_end++)
{
name[nlen] = op_start[nlen];
nlen++;
+ if (nlen == sizeof (name) - 1)
+ break;
}
name [nlen] = 0;