wrong parenthesis on sizeof for the gdb xml code

This commit is contained in:
Srimanta Barua 2017-08-23 04:37:32 +05:30 committed by radare
parent ee4f42d13e
commit b44ab3f9ef

View File

@ -427,7 +427,7 @@ static int gdbr_parse_target_xml(libgdbr_t *g, char *xml_data, ut64 len) {
eprintf ("Register name too long: %s\n", regname);
}
strncpy (arch_regs[num_regs].name, regname,
sizeof (*arch_regs[num_regs].name - 1));
sizeof (arch_regs[num_regs].name) - 1);
arch_regs[num_regs].name[sizeof (arch_regs[num_regs].name) - 1] = '\0';
arch_regs[num_regs].offset = reg_off;
arch_regs[num_regs].size = reg_sz / 8;