From 53acf6420efecec7a6ceb0453675f5d5d8c0c5c8 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Tue, 4 Oct 2011 02:22:35 +0200 Subject: [PATCH] Hardcode product name for breakpad as the conversion code crashes --- src/breakpad/BreakPad.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/breakpad/BreakPad.cpp b/src/breakpad/BreakPad.cpp index 85caa87f5..b37a2aa09 100644 --- a/src/breakpad/BreakPad.cpp +++ b/src/breakpad/BreakPad.cpp @@ -93,17 +93,20 @@ LaunchUploader( const wchar_t* dump_dir, const wchar_t* minidump_id, void* that, // DON'T USE THE HEAP!!! // So that indeed means, no QStrings, no qDebug(), no QAnything, seriously! - const char* productName = static_cast(that)->productName(); +// broken in mingw, hardcode it for now + // const char* productName = static_cast(that)->productName();s // convert productName to widechars, which sadly means the product name must be Latin1 - wchar_t product_name[ 256 ]; - char* out = (char*)product_name; - const char* in = productName - 1; - do { - *out++ = *++in; //latin1 chars fit in first byte of each wchar - *out++ = '\0'; //every second byte is NULL - } - while (*in); + + wchar_t product_name[ 256 ] = L"tomahawk";; + +// char* out = (char*)product_name; +// const char* in = productName - 1; +// do { +// *out++ = *++in; //latin1 chars fit in first byte of each wchar +// *out++ = '\0'; //every second byte is NULL +// } +// while (*in); wchar_t command[MAX_PATH * 3 + 6]; wcscpy( command, CRASH_REPORTER_BINARY L" \"" );