mirror of https://github.com/x64dbg/zydis
Added previously forgotten const qualifiers
- Also, fixed integer comparision warning in `ZydisPerfTest`
This commit is contained in:
parent
4de4def535
commit
95338c59bc
|
@ -393,7 +393,7 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
rewind(file);
|
rewind(file);
|
||||||
if (fread(buffer, 1, length, file) != length)
|
if (fread(buffer, 1, length, file) != (size_t)length)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Could not read %" PRIu64 " bytes from file \"%s\"", (uint64_t)length, &buf[0]);
|
"Could not read %" PRIu64 " bytes from file \"%s\"", (uint64_t)length, &buf[0]);
|
||||||
|
|
|
@ -536,7 +536,7 @@ ZYDIS_EXPORT ZydisStatus ZydisFormatterSetHook(ZydisFormatter* formatter,
|
||||||
* @return A zydis status code.
|
* @return A zydis status code.
|
||||||
*/
|
*/
|
||||||
ZYDIS_EXPORT ZydisStatus ZydisFormatterFormatInstruction(const ZydisFormatter* formatter,
|
ZYDIS_EXPORT ZydisStatus ZydisFormatterFormatInstruction(const ZydisFormatter* formatter,
|
||||||
ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen);
|
const ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Formats the given instruction and writes it into the output buffer.
|
* @brief Formats the given instruction and writes it into the output buffer.
|
||||||
|
@ -551,7 +551,7 @@ ZYDIS_EXPORT ZydisStatus ZydisFormatterFormatInstruction(const ZydisFormatter* f
|
||||||
* @return A zydis status code.
|
* @return A zydis status code.
|
||||||
*/
|
*/
|
||||||
ZYDIS_EXPORT ZydisStatus ZydisFormatterFormatInstructionEx(const ZydisFormatter* formatter,
|
ZYDIS_EXPORT ZydisStatus ZydisFormatterFormatInstructionEx(const ZydisFormatter* formatter,
|
||||||
ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen, void* userData);
|
const ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen, void* userData);
|
||||||
|
|
||||||
/* ============================================================================================== */
|
/* ============================================================================================== */
|
||||||
|
|
||||||
|
|
|
@ -1074,13 +1074,13 @@ ZydisStatus ZydisFormatterSetHook(ZydisFormatter* formatter, ZydisFormatterHookT
|
||||||
}
|
}
|
||||||
|
|
||||||
ZydisStatus ZydisFormatterFormatInstruction(const ZydisFormatter* formatter,
|
ZydisStatus ZydisFormatterFormatInstruction(const ZydisFormatter* formatter,
|
||||||
ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen)
|
const ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen)
|
||||||
{
|
{
|
||||||
return ZydisFormatterFormatInstructionEx(formatter, instruction, buffer, bufferLen, NULL);
|
return ZydisFormatterFormatInstructionEx(formatter, instruction, buffer, bufferLen, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ZydisStatus ZydisFormatterFormatInstructionEx(const ZydisFormatter* formatter,
|
ZydisStatus ZydisFormatterFormatInstructionEx(const ZydisFormatter* formatter,
|
||||||
ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen, void* userData)
|
const ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen, void* userData)
|
||||||
{
|
{
|
||||||
if (!formatter || !instruction || !buffer || (bufferLen == 0))
|
if (!formatter || !instruction || !buffer || (bufferLen == 0))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue