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:
hrydgard 2008-09-13 18:15:53 +00:00
parent b0aaac3890
commit 7a8d4a1987
4 changed files with 11 additions and 4 deletions

View File

@ -134,10 +134,10 @@ bool Init(const SCoreStartupParameter _CoreParameter)
PanicAlert("Failed to load video plugin %s", g_CoreStartupParameter.m_strVideoPlugin.c_str());
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());
return false;
}*/
}
#ifdef _WIN32
if (PluginDSP::DllDebugger)

View File

@ -73,10 +73,14 @@ void HLE_printf()
void GetStringVA(std::string& _rOutBuffer)
{
_rOutBuffer = "";
char ArgumentBuffer[256];
u32 ParameterCounter = 4;
char* pString = (char*)Memory::GetPointer(GPR(3));
if (!pString) {
//PanicAlert("Invalid GetStringVA call");
return;
}
while(*pString)
{
if (*pString == '%')

View File

@ -21,6 +21,7 @@
#include <string>
#include <vector>
#include "../HW/Memmap.h"
#include "SymbolDB.h"
#include "SignatureDB.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)
{
if (!Memory::IsRAMAddress(addr))
return 0;
XFuncMap::iterator it = functions.find(addr);
if (it != functions.end())
return &it->second;

View File

@ -110,7 +110,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
break;
case DLL_PROCESS_DETACH:
CloseConsole();
wxEntryCleanup(); //use wxUninitialize() if you don't want GUI
break;
default:
@ -265,6 +264,7 @@ void SendReportCoreAccelIr12() {
pReport->a.x = 0x81;
pReport->a.y = 0x78;
pReport->a.z = 0xD9;
pReport->ir[0].x = 320 & 0xFF;
pReport->ir[0].y = 240;
pReport->ir[0].size = 10;