diff --git a/src/Strings.cpp b/src/Strings.cpp index bedd465..fef8231 100644 --- a/src/Strings.cpp +++ b/src/Strings.cpp @@ -13,7 +13,12 @@ std::string CodeToString(UInt32 value) std::stringstream ss; +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ss << "'" << bytes[0] << bytes[1] << bytes[2] << bytes[3] << "'"; +#else + ss << "'" << bytes[3] << bytes[2] << bytes[1] << bytes[0] << "'"; +#endif + ss << " (0x" << std::hex << value << ")"; return ss.str();