diff --git a/include/Zydis/Register.h b/include/Zydis/Register.h index 5cde496..d35a455 100644 --- a/include/Zydis/Register.h +++ b/include/Zydis/Register.h @@ -115,7 +115,7 @@ enum ZydisRegisters // Special registers ZYDIS_REGISTER_MXCSR, ZYDIS_REGISTER_PKRU, ZYDIS_REGISTER_XCR0, // Segment registers - ZYDIS_REGISTER_ES, ZYDIS_REGISTER_SS, ZYDIS_REGISTER_CS, ZYDIS_REGISTER_DS, + ZYDIS_REGISTER_ES, ZYDIS_REGISTER_CS, ZYDIS_REGISTER_SS, ZYDIS_REGISTER_DS, ZYDIS_REGISTER_FS, ZYDIS_REGISTER_GS, // Table registers ZYDIS_REGISTER_GDTR, ZYDIS_REGISTER_LDTR, ZYDIS_REGISTER_IDTR, ZYDIS_REGISTER_TR, diff --git a/src/Decoder.c b/src/Decoder.c index 9a78bd4..d42ff54 100644 --- a/src/Decoder.c +++ b/src/Decoder.c @@ -665,7 +665,7 @@ static ZydisStatus ZydisReadImmediate(ZydisDecoderContext* context, ZydisInstruc case 64: { uint64_t data[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - for (int i = sizeof(data) / sizeof(data[0]); i > 0; --i) + for (int i = ZYDIS_ARRAY_SIZE(data); i > 0; --i) { ZYDIS_CHECK(ZydisInputNext(context, info, (uint8_t*)&data[i - 1])); } diff --git a/src/Register.c b/src/Register.c index c166ff6..3746940 100644 --- a/src/Register.c +++ b/src/Register.c @@ -92,7 +92,7 @@ const char* registerStrings[] = "eip", "ip", "mxcsr", "pkru", "xcr0", // Segment registers - "es", "ss", "cs", "ds", + "es", "cs", "ss", "ds", "fs", "gs", // Table registers "gdtr", "ldtr", "idtr", "tr",