diff --git a/src/debug.cpp b/src/debug.cpp index aff90c7..80c0d65 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -142,7 +142,7 @@ namespace bx if (NULL != _data) { - const uint8_t* data = reinterpret_cast(_data); + const uint8_t* data = (const uint8_t*)_data; char hex[HEX_DUMP_WIDTH*3+1]; char ascii[HEX_DUMP_WIDTH+1]; uint32_t hexPos = 0; diff --git a/tools/bin2c/bin2c.cpp b/tools/bin2c/bin2c.cpp index 49cd923..75743de 100644 --- a/tools/bin2c/bin2c.cpp +++ b/tools/bin2c/bin2c.cpp @@ -58,7 +58,7 @@ public: void outputString(bx::WriterI* _writer) { - const char* data = (const char*)m_mb.more(0); + const uint8_t* data = (const uint8_t*)m_mb.more(0); uint32_t size = uint32_t(bx::seek(&m_mw) ); bx::Error err; @@ -77,7 +77,7 @@ public: for (uint32_t ii = 0; ii < size; ++ii) { - char ch = data[ii]; + const char ch = char(data[ii]); if (!escaped) { @@ -113,7 +113,7 @@ public: #define HEX_DUMP_WIDTH 16 #define HEX_DUMP_SPACE_WIDTH 96 #define HEX_DUMP_FORMAT "%-" BX_STRINGIZE(HEX_DUMP_SPACE_WIDTH) "." BX_STRINGIZE(HEX_DUMP_SPACE_WIDTH) "s" - const char* data = (const char*)m_mb.more(0); + const uint8_t* data = (const uint8_t*)m_mb.more(0); uint32_t size = uint32_t(bx::seek(&m_mw) ); bx::Error err;