diff --git a/examples/common/entry/input.cpp b/examples/common/entry/input.cpp index 49f1eb51..543100be 100644 --- a/examples/common/entry/input.cpp +++ b/examples/common/entry/input.cpp @@ -157,7 +157,11 @@ struct Input void removeBindings(const char* _name) { - m_inputBindingsMap.erase(m_inputBindingsMap.find(_name)); + InputBindingMap::iterator it = m_inputBindingsMap.find(_name); + if (it != m_inputBindingsMap.end() ) + { + m_inputBindingsMap.erase(it); + } } void process(const InputBinding* _bindings) diff --git a/src/bgfx_p.h b/src/bgfx_p.h index da52055b..9de97a3d 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -2223,7 +2223,12 @@ namespace bgfx && BGFX_CHUNK_MAGIC_FSH != magic && BGFX_CHUNK_MAGIC_VSH != magic) { - BX_WARN(false, "Invalid shader signature! 0x%08x.", magic); + BX_WARN(false, "Invalid shader signature! %c%c%c%d." + , ( (uint8_t*)&magic)[0] + , ( (uint8_t*)&magic)[1] + , ( (uint8_t*)&magic)[2] + , ( (uint8_t*)&magic)[3] + ); ShaderHandle invalid = BGFX_INVALID_HANDLE; return invalid; }