mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-08 06:47:33 +00:00
fix crash in nz assembler
This commit is contained in:
parent
e62aac49f3
commit
3c8066ce57
@ -1668,7 +1668,7 @@ LookupTable oplookup[] = {
|
||||
{"xor", &opxor, 0},
|
||||
{"xsetbv", NULL, 0x0f01d1, 3},
|
||||
{"test", &optest, 0},
|
||||
{ NULL, NULL, 0}
|
||||
{{0}, NULL, 0, 0}
|
||||
};
|
||||
|
||||
static x86newTokenType getToken(const char *str, size_t *begin, size_t *end) {
|
||||
@ -2036,7 +2036,7 @@ static int assemble(RAsm *a, RAsmOp *ao, const char *str) {
|
||||
parseOpcode (a, op, &instr);
|
||||
|
||||
for (lt_ptr = oplookup; lt_ptr - oplookup < sizeof (oplookup); ++lt_ptr) {
|
||||
if (!strcasecmp (instr.mnemonic, lt_ptr->mnemonic)) {
|
||||
if (!r_str_casestr (instr.mnemonic, lt_ptr->mnemonic)) {
|
||||
if (lt_ptr->opcode > 0) {
|
||||
ut8 *ptr = (ut8 *)<_ptr->opcode;
|
||||
int i = 0;
|
||||
|
@ -1553,7 +1553,7 @@ R_API int r_str_len_utf8char (const char *s, int left) {
|
||||
return i;
|
||||
}
|
||||
|
||||
R_API int r_str_len_utf8 (const char *s) {
|
||||
R_API int r_str_len_utf8(const char *s) {
|
||||
int i = 0, j = 0;
|
||||
while (s[i]) {
|
||||
if ((s[i] & 0xc0) != 0x80) j++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user