From 9a4dc4e8102d10feef3d324ace7a3198013c5bd6 Mon Sep 17 00:00:00 2001 From: drkiiraziel Date: Sat, 15 Nov 2008 02:30:29 +0000 Subject: 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 --- Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp') diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp index 4cd62306bb..a627df974d 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp @@ -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); } -- cgit v1.2.3