X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwinboard.c;h=a00473eea16fb14a9d7876abace484ba9d006646;hb=873f7b33a08877e546e16f63a3a70dae8b3633aa;hp=55802b4aec4337bb1e6591d80f2c7abd7a491230;hpb=5017dc767149c89922d8af7d46eb821a373eb2d0;p=xboard.git diff --git a/winboard/winboard.c b/winboard/winboard.c index 55802b4..a00473e 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -1671,6 +1672,8 @@ ParseArgs(GetFunc get, void *cl) case ArgNone: ExitArgError("Unrecognized argument", argValue); break; + case ArgTrue: + case ArgFalse: ; } } } @@ -1844,6 +1847,7 @@ InitAppData(LPSTR lpCmdLine) appData.reuseSecond = TRUE; appData.blindfold = FALSE; appData.icsEngineAnalyze = FALSE; + memset(&dcb, 0, sizeof(DCB)); // required by VS 2002 + dcb.DCBlength = sizeof(DCB); dcb.BaudRate = 9600; dcb.fBinary = TRUE; @@ -8864,7 +8868,7 @@ DisplayMessage(char *str1, char *str2) } messageText[MESSAGE_TEXT_MAX - 1] = NULLCHAR; - if (IsIconic(hwndMain)) return; + if (hwndMain == NULL || IsIconic(hwndMain)) return; hdc = GetDC(hwndMain); oldFont = SelectObject(hdc, font[boardSize][MESSAGE_FONT]->hf); ExtTextOut(hdc, messageRect.left, messageRect.top, ETO_CLIPPED|ETO_OPAQUE, @@ -10697,3 +10701,4 @@ void SetProgramStats( FrontEndProgramStats * stats ) EngineOutputUpdate( stats ); } +/// \ No newline at end of file