mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Defend against bad parameters for HLE_Printf, early out in symboldb, misc
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@520 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -134,10 +134,10 @@ bool Init(const SCoreStartupParameter _CoreParameter)
|
|||||||
PanicAlert("Failed to load video plugin %s", g_CoreStartupParameter.m_strVideoPlugin.c_str());
|
PanicAlert("Failed to load video plugin %s", g_CoreStartupParameter.m_strVideoPlugin.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/*if (!PluginWiimote::LoadPlugin(g_CoreStartupParameter.m_strWiimotePlugin.c_str())) {
|
if (!PluginWiimote::LoadPlugin(g_CoreStartupParameter.m_strWiimotePlugin.c_str())) {
|
||||||
PanicAlert("Failed to load Wiimote plugin %s", g_CoreStartupParameter.m_strWiimotePlugin.c_str());
|
PanicAlert("Failed to load Wiimote plugin %s", g_CoreStartupParameter.m_strWiimotePlugin.c_str());
|
||||||
return false;
|
return false;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (PluginDSP::DllDebugger)
|
if (PluginDSP::DllDebugger)
|
||||||
|
@ -73,10 +73,14 @@ void HLE_printf()
|
|||||||
|
|
||||||
void GetStringVA(std::string& _rOutBuffer)
|
void GetStringVA(std::string& _rOutBuffer)
|
||||||
{
|
{
|
||||||
|
_rOutBuffer = "";
|
||||||
char ArgumentBuffer[256];
|
char ArgumentBuffer[256];
|
||||||
u32 ParameterCounter = 4;
|
u32 ParameterCounter = 4;
|
||||||
char* pString = (char*)Memory::GetPointer(GPR(3));
|
char* pString = (char*)Memory::GetPointer(GPR(3));
|
||||||
|
if (!pString) {
|
||||||
|
//PanicAlert("Invalid GetStringVA call");
|
||||||
|
return;
|
||||||
|
}
|
||||||
while(*pString)
|
while(*pString)
|
||||||
{
|
{
|
||||||
if (*pString == '%')
|
if (*pString == '%')
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "../HW/Memmap.h"
|
||||||
#include "SymbolDB.h"
|
#include "SymbolDB.h"
|
||||||
#include "SignatureDB.h"
|
#include "SignatureDB.h"
|
||||||
#include "PPCAnalyst.h"
|
#include "PPCAnalyst.h"
|
||||||
@ -104,6 +105,8 @@ void SymbolDB::AddKnownSymbol(u32 startAddr, u32 size, const char *name, int typ
|
|||||||
|
|
||||||
Symbol *SymbolDB::GetSymbolFromAddr(u32 addr)
|
Symbol *SymbolDB::GetSymbolFromAddr(u32 addr)
|
||||||
{
|
{
|
||||||
|
if (!Memory::IsRAMAddress(addr))
|
||||||
|
return 0;
|
||||||
XFuncMap::iterator it = functions.find(addr);
|
XFuncMap::iterator it = functions.find(addr);
|
||||||
if (it != functions.end())
|
if (it != functions.end())
|
||||||
return &it->second;
|
return &it->second;
|
||||||
|
@ -110,7 +110,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
CloseConsole();
|
|
||||||
wxEntryCleanup(); //use wxUninitialize() if you don't want GUI
|
wxEntryCleanup(); //use wxUninitialize() if you don't want GUI
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -265,6 +264,7 @@ void SendReportCoreAccelIr12() {
|
|||||||
pReport->a.x = 0x81;
|
pReport->a.x = 0x81;
|
||||||
pReport->a.y = 0x78;
|
pReport->a.y = 0x78;
|
||||||
pReport->a.z = 0xD9;
|
pReport->a.z = 0xD9;
|
||||||
|
|
||||||
pReport->ir[0].x = 320 & 0xFF;
|
pReport->ir[0].x = 320 & 0xFF;
|
||||||
pReport->ir[0].y = 240;
|
pReport->ir[0].y = 240;
|
||||||
pReport->ir[0].size = 10;
|
pReport->ir[0].size = 10;
|
||||||
|
Reference in New Issue
Block a user