diff --git a/stepmania/src/archutils/Win32/Crash.cpp b/stepmania/src/archutils/Win32/Crash.cpp index f06a37f283..b5554aaa9f 100644 --- a/stepmania/src/archutils/Win32/Crash.cpp +++ b/stepmania/src/archutils/Win32/Crash.cpp @@ -80,6 +80,7 @@ struct VDDebugInfoContext const unsigned long (*pSegments)[2]; int nSegments; char sFilename[1024]; + char szError[1024]; }; @@ -445,8 +446,12 @@ bool VDDebugInfoInitFromMemory(VDDebugInfoContext *pctx, const void *_src) { pctx->pRVAHeap = NULL; - if (memcmp((char *)src, PRODUCT_NAME " symbolic debug information", 36)) + static const char *header = "symbolic debug information"; + if (memcmp((char *)src, header, strlen(header))) + { + strcpy( pctx->szError, "header doesn't match" ); return false; + } // Extract fields @@ -474,15 +479,18 @@ bool VDDebugInfoInitFromFile( VDDebugInfoContext *pctx ) if( pctx->Loaded() ) return true; - GetVDIPath( pctx->sFilename, sizeof(pctx->sFilename) ); - pctx->pRawBlock = NULL; pctx->pRVAHeap = NULL; + GetVDIPath( pctx->sFilename, ARRAYSIZE(pctx->sFilename) ); + pctx->szError[0] = 0; HANDLE h = CreateFile(pctx->sFilename, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (INVALID_HANDLE_VALUE == h) + { + strcpy( pctx->szError, "CreateFile failed" ); return false; + } do { DWORD dwFileSize = GetFileSize(h, NULL); @@ -751,7 +759,7 @@ static bool ReportCallStack( HWND hwnd, HANDLE hFile, const void **Backtrace ) VDDebugInfoInitFromFile( &g_debugInfo ); if( !g_debugInfo.Loaded() ) { - Report( hwnd, hFile, "Could not open debug resource file (%s).", g_debugInfo.sFilename ); + Report( hwnd, hFile, "debug resource file '%s': %s.", g_debugInfo.sFilename, g_debugInfo.szError ); return false; } diff --git a/stepmania/src/archutils/Win32/mapconv.cpp b/stepmania/src/archutils/Win32/mapconv.cpp index 177e83990a..2ca9e8f472 100644 --- a/stepmania/src/archutils/Win32/mapconv.cpp +++ b/stepmania/src/archutils/Win32/mapconv.cpp @@ -267,7 +267,7 @@ int main(int argc, char **argv) { // dump data - static const char header[64]="StepMania symbolic debug information\r\n\x1A"; + static const char header[64]="symbolic debug information\r\n\x1A"; fwrite(header, 64, 1, fo); diff --git a/stepmania/src/archutils/Win32/mapconv.exe b/stepmania/src/archutils/Win32/mapconv.exe index ccf021b4e4..26b6f68894 100644 Binary files a/stepmania/src/archutils/Win32/mapconv.exe and b/stepmania/src/archutils/Win32/mapconv.exe differ