diff --git a/src/interfaces/idapro/STARSIDAProgram.cpp b/src/interfaces/idapro/STARSIDAProgram.cpp index 25085b2fbe77d33f6b34f883de57e4b75c39d041..2b52cc1991cfc96194d610dfcbe3d2f2ba9a3828 100644 --- a/src/interfaces/idapro/STARSIDAProgram.cpp +++ b/src/interfaces/idapro/STARSIDAProgram.cpp @@ -291,11 +291,12 @@ void STARS_IDA_Program_t::InitStaticDataTable(SMPProgram *CurrProg) { } } } -#ifdef __EA64__ - uint64_t DataValue = get_qword(TempAddr); -#else - uint32_t DataValue = get_long(TempAddr); -#endif + STARS_ea_t DataValue; + if (4 < global_STARS_program->GetSTARS_ISA_Bytewidth()) + DataValue = (STARS_ea_t) ::get_qword(TempAddr); + else + DataValue = (STARS_ea_t) ::get_long(TempAddr); + if (DataValue != 0) { // Is this a code address? STARS_ea_t PossibleCodeAddr = (STARS_ea_t) DataValue;