X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwchat.c;h=1da04b749f738f74d6e9018b3291aea3347172ce;hb=e80c98c04e951e5026a24531cd6316be962636b9;hp=1f786054bf3cb1951b89d796ea70a1b66375980f;hpb=0ea1b434ac6becf79c75d85ba27de5b89666a7c3;p=xboard.git diff --git a/winboard/wchat.c b/winboard/wchat.c index 1f78605..1da04b7 100644 --- a/winboard/wchat.c +++ b/winboard/wchat.c @@ -3,7 +3,7 @@ * * Author: H.G.Muller (August 2009) * - * Copyright 2009, 2010 Free Software Foundation, Inc. + * Copyright 2009, 2010 Free Software Foundation, Inc. * * ------------------------------------------------------------------------ * @@ -193,7 +193,7 @@ LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam if(partner<0) { for(i=0; i is pressed while editing the filter, it's better to apply the filter rather than selecting the current game. @@ -287,16 +287,16 @@ LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam // from here on it could be back-end SaveInHistory(mess); if(!strcmp("whispers", chatPartner[partner])) - sprintf(buf, "whisper %s\n", mess); // WHISPER box uses "whisper" to send + snprintf(buf, MSG_SIZ, "whisper %s\n", mess); // WHISPER box uses "whisper" to send else if(!strcmp("shouts", chatPartner[partner])) - sprintf(buf, "shout %s\n", mess); // SHOUT box uses "shout" to send + snprintf(buf, MSG_SIZ, "shout %s\n", mess); // SHOUT box uses "shout" to send else { if(!atoi(chatPartner[partner])) { - sprintf(buf, "> %s\r\n", mess); // echo only tells to handle, not channel + snprintf(buf, MSG_SIZ, "> %s\r\n", mess); // echo only tells to handle, not channel InsertIntoMemo(hDlg, buf); - sprintf(buf, "xtell %s %s\n", chatPartner[partner], mess); + snprintf(buf, MSG_SIZ, "xtell %s %s\n", chatPartner[partner], mess); } else - sprintf(buf, "tell %s %s\n", chatPartner[partner], mess); + snprintf(buf, MSG_SIZ, "tell %s %s\n", chatPartner[partner], mess); } SendToICS(buf); break; @@ -360,12 +360,12 @@ void ChatPopUp(char *icsHandle) { FARPROC lpProc; int i, partner = -1; - + CheckMenuItem(GetMenu(hwndMain), IDM_NewChat, MF_CHECKED); for(i=0; i