mirror of https://github.com/x64dbg/zydis
Fixed two formatter issues
- Unintentional fallthrough - Assertion on 0-length append
This commit is contained in:
parent
c77c9f2561
commit
d2c6115f6f
|
@ -332,8 +332,10 @@ ZydisStatus ZydisPrintStr(char** buffer, size_t bufferLen, const char* text,
|
||||||
break;
|
break;
|
||||||
case ZYDIS_LETTER_CASE_LOWER:
|
case ZYDIS_LETTER_CASE_LOWER:
|
||||||
ZydisToLowerCase(*buffer, strLen);
|
ZydisToLowerCase(*buffer, strLen);
|
||||||
|
break;
|
||||||
case ZYDIS_LETTER_CASE_UPPER:
|
case ZYDIS_LETTER_CASE_UPPER:
|
||||||
ZydisToUpperCase(*buffer, strLen);
|
ZydisToUpperCase(*buffer, strLen);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ZYDIS_UNREACHABLE;
|
ZYDIS_UNREACHABLE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -464,7 +464,7 @@ static ZydisStatus ZydisFormatterPrintOperandSizeIntel(const ZydisFormatter* for
|
||||||
}
|
}
|
||||||
if (typecast)
|
if (typecast)
|
||||||
{
|
{
|
||||||
char* str = "";
|
const char* str = NULL;
|
||||||
switch (typecast)
|
switch (typecast)
|
||||||
{
|
{
|
||||||
case 8:
|
case 8:
|
||||||
|
@ -497,8 +497,12 @@ static ZydisStatus ZydisFormatterPrintOperandSizeIntel(const ZydisFormatter* for
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (str)
|
||||||
|
{
|
||||||
return ZydisPrintStr(buffer, bufferLen, str, ZYDIS_LETTER_CASE);
|
return ZydisPrintStr(buffer, bufferLen, str, ZYDIS_LETTER_CASE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return ZYDIS_STATUS_SUCCESS;
|
return ZYDIS_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue