DBG+BRIDGE: fixed a small buffer overrun bug and also fixed a warning with signed/unsigned comparison
This commit is contained in:
parent
4c313061cf
commit
11921963d9
|
|
@ -88,7 +88,7 @@ public:
|
|||
*/
|
||||
inline Type & operator[](size_t index) const
|
||||
{
|
||||
if(index >= count()) //make sure the out-of-bounds access is caught as soon as possible.
|
||||
if(index >= size_t(count())) //make sure the out-of-bounds access is caught as soon as possible.
|
||||
__debugbreak();
|
||||
return data()[index];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -965,7 +965,7 @@ extern "C" DLL_EXPORT uint _dbg_sendmessage(DBGMSG type, void* param1, void* par
|
|||
{
|
||||
STRING_TYPE strtype;
|
||||
char string[MAX_STRING_SIZE];
|
||||
if(disasmgetstringat((uint)param1, &strtype, string, string, MAX_STRING_SIZE))
|
||||
if(disasmgetstringat((uint)param1, &strtype, string, string, MAX_STRING_SIZE-3))
|
||||
{
|
||||
if(strtype == str_ascii)
|
||||
sprintf((char*)param2, "\"%s\"", string);
|
||||
|
|
|
|||
Loading…
Reference in New Issue