Fixed small buffer overruns and other minor bugs that were found by VS2008 code analysis

Added a check on both video plugins to prevent crashing when Memory_GetPtr retuns null pointer at ExecuteDisplayList  (invalid address? Dave Mirra BMX 2 crashes there ...)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1179 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
drkiiraziel
2008-11-15 02:30:29 +00:00
parent ab1774b28a
commit 9a4dc4e810
5 changed files with 39 additions and 29 deletions

View File

@ -200,7 +200,7 @@ void TextureCache::Load(int stage, u32 address, int width, int height, int forma
{ // dump texture to file
static int counter = 0;
char szTemp[MAX_PATH];
sprintf(szTemp, "%s\\txt_%04i_%i.png", g_Config.texDumpPath, counter++, format);
sprintf(szTemp, "%s\\txt_%04i_%i.png", g_Config.texDumpPath.c_str(), counter++, format);
D3DXSaveTextureToFile(szTemp,D3DXIFF_BMP,entry.texture,0);
}