Skip to content

Commit 25a0881

Browse files
committed
Rename STR_REGISTER -> STR_REGISTERS
Otherwise it clashes with another static identifier in amalgamated builds.
1 parent 20462ba commit 25a0881

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Generated/EnumRegister.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
static const ZydisShortString STR_REGISTER[] =
1+
static const ZydisShortString STR_REGISTERS[] =
22
{
33
ZYDIS_MAKE_SHORTSTRING("none"),
44
// General purpose registers 8-bit

src/Register.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -225,22 +225,22 @@ ZydisRegister ZydisRegisterGetLargestEnclosing(ZydisMachineMode mode, ZydisRegis
225225

226226
const char* ZydisRegisterGetString(ZydisRegister reg)
227227
{
228-
if ((ZyanUSize)reg >= ZYAN_ARRAY_LENGTH(STR_REGISTER))
228+
if ((ZyanUSize)reg >= ZYAN_ARRAY_LENGTH(STR_REGISTERS))
229229
{
230230
return ZYAN_NULL;
231231
}
232232

233-
return STR_REGISTER[reg].data;
233+
return STR_REGISTERS[reg].data;
234234
}
235235

236236
const ZydisShortString* ZydisRegisterGetStringWrapped(ZydisRegister reg)
237237
{
238-
if ((ZyanUSize)reg >= ZYAN_ARRAY_LENGTH(STR_REGISTER))
238+
if ((ZyanUSize)reg >= ZYAN_ARRAY_LENGTH(STR_REGISTERS))
239239
{
240240
return ZYAN_NULL;
241241
}
242242

243-
return &STR_REGISTER[reg];
243+
return &STR_REGISTERS[reg];
244244
}
245245

246246
/* ---------------------------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)