From bce816e7e4bfaf8fe51dd406ba870cb1efe463f4 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 2 Mar 2001 09:24:05 +0000 Subject: [PATCH] Jacob's fixes for the Event Log git-svn-id: svn://svn.tartarus.org/sgt/putty@963 cda61777-01e9-0310-a592-d414129be87e --- windlg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/windlg.c b/windlg.c index f814cf4b..6d3b0f48 100644 --- a/windlg.c +++ b/windlg.c @@ -50,7 +50,7 @@ static int CALLBACK LogProc (HWND hwnd, UINT msg, switch (msg) { case WM_INITDIALOG: { - static const int tabs[4] = {78, 108}; + static int tabs[4] = {78, 108}; SendDlgItemMessage (hwnd, IDN_LIST, LB_SETTABSTOPS, 2, (LPARAM) tabs); } @@ -2058,14 +2058,14 @@ void logevent (char *string) { events[nevents] = smalloc(strlen(timebuf)+strlen(string)+1); strcpy(events[nevents], timebuf); strcat(events[nevents], string); - nevents++; if (logbox) { int count; SendDlgItemMessage (logbox, IDN_LIST, LB_ADDSTRING, - 0, (LPARAM)string); + 0, (LPARAM)events[nevents]); count = SendDlgItemMessage (logbox, IDN_LIST, LB_GETCOUNT, 0, 0); SendDlgItemMessage (logbox, IDN_LIST, LB_SETTOPINDEX, count-1, 0); } + nevents++; } void showeventlog (HWND hwnd) { -- 2.11.0