зеркало из https://github.com/mozilla/gecko-dev.git
bug 473151 - limit the number of characters usable in windbgdlg; r=timeless sr=neil
This commit is contained in:
Родитель
efe62e0346
Коммит
be46f2c48b
|
@ -39,18 +39,17 @@
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
/* Windows only app to show a modal debug dialog - launched by nsDebug.cpp */
|
/* Windows only app to show a modal debug dialog - launched by nsDebug.cpp */
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include <strsafe.h>
|
||||||
|
#endif
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
|
|
||||||
/* MingW currently does not implement a wide version of the
|
/* MingW currently does not implement a wide version of the
|
||||||
startup routines. Workaround is to implement something like
|
startup routines. Workaround is to implement something like
|
||||||
it ourselves. See bug 472063 */
|
it ourselves. See bug 472063 */
|
||||||
|
#include <stdio.h>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
|
|
||||||
int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int);
|
int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int);
|
||||||
|
|
||||||
#undef __argc
|
#undef __argc
|
||||||
|
@ -136,14 +135,20 @@ wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||||
RegCloseKey(hkeyLM);
|
RegCloseKey(hkeyLM);
|
||||||
if (regValue != (DWORD)-1 && regValue != (DWORD)-2)
|
if (regValue != (DWORD)-1 && regValue != (DWORD)-2)
|
||||||
return regValue;
|
return regValue;
|
||||||
static WCHAR msg[4048];
|
static const int size = 4096;
|
||||||
|
static WCHAR msg[size];
|
||||||
|
|
||||||
wsprintfW(msg,
|
#ifdef _MSC_VER
|
||||||
|
StringCchPrintfW(msg,
|
||||||
|
#else
|
||||||
|
snwprintf(msg,
|
||||||
|
#endif
|
||||||
|
size,
|
||||||
L"%s\n\nClick Abort to exit the Application.\n"
|
L"%s\n\nClick Abort to exit the Application.\n"
|
||||||
L"Click Retry to Debug the Application.\n"
|
L"Click Retry to Debug the Application.\n"
|
||||||
L"Click Ignore to continue running the Application.",
|
L"Click Ignore to continue running the Application.",
|
||||||
lpszCmdLine);
|
lpszCmdLine);
|
||||||
|
msg[size - 1] = L'\0';
|
||||||
return MessageBoxW(NULL, msg, L"NSGlue_Assertion",
|
return MessageBoxW(NULL, msg, L"NSGlue_Assertion",
|
||||||
MB_ICONSTOP | MB_SYSTEMMODAL |
|
MB_ICONSTOP | MB_SYSTEMMODAL |
|
||||||
MB_ABORTRETRYIGNORE | MB_DEFBUTTON3);
|
MB_ABORTRETRYIGNORE | MB_DEFBUTTON3);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче