diff options
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 9679a5e..f2b81f2 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -13531,9 +13531,7 @@ mips_lookup_insn (struct hash_control *hash, const char *start, struct mips_opcode *insn; /* Make a copy of the instruction so that we can fiddle with it. */ - name = xmalloc (length + 1); - memcpy (name, start, length); - name[length] = '\0'; + name = xstrndup (start, length); /* Look up the instruction as-is. */ insn = (struct mips_opcode *) hash_find (hash, name); |