From f62331d17c8266e36071ebcf096c151c34ea487d Mon Sep 17 00:00:00 2001 From: Alexey Kulakov Date: Fri, 17 Jan 2014 12:28:10 +0000 Subject: small changes (defaults, initialization) git-svn-id: http://svn.miranda-ng.org/main/trunk@7686 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/QuickSearch/i_ok.inc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'plugins/QuickSearch/i_ok.inc') diff --git a/plugins/QuickSearch/i_ok.inc b/plugins/QuickSearch/i_ok.inc index bbeb383fb0..08bfafab09 100644 --- a/plugins/QuickSearch/i_ok.inc +++ b/plugins/QuickSearch/i_ok.inc @@ -260,7 +260,7 @@ end; procedure LoadOneItem(hContact:THANDLE;column:pcolumnitem;proto:integer; var res:tQSRec); var - tmp:uint_ptr; + tmp:int_ptr; lmodule,srv:PAnsiChar; DbEvent:HDBEVENT; cni:TCONTACTINFO; @@ -269,7 +269,7 @@ var begin FillChar(res,SizeOf(tQSRec),0); res.data:=uint_ptr(-1); - res.text:=nil; + mFreeMem(res.text); with column^ do begin @@ -286,7 +286,7 @@ begin srv:=ParseVarString(service,hContact,nil) else srv:=service; - tmp:=uint_ptr(CallService(srv,TWPARAM(wparam.value),TLPARAM(lparam.value))); + tmp:=int_ptr(CallService(srv,TWPARAM(wparam.value),TLPARAM(lparam.value))); if (restype and ACF_SCRIPT_SERVICE)<>0 then mFreeMem(srv); @@ -494,6 +494,9 @@ begin SetLength(MainBuf,cnt,qsopt.numcolumns); SetLength(FlagBuf,cnt); + for i:=0 to cnt1-1 do + FillChar(MainBuf[i][0],qsopt.numcolumns*SizeOf(tQSRec),0); + for i:=0 to qsopt.numcolumns-1 do begin with qsopt.columns[i] do @@ -515,11 +518,7 @@ begin if cnt1=cnt then break; // additional checking hContact:=db_find_next(hContact); end; - if cnt1<>cnt then - begin - SetLength(MainBuf,cnt1); - SetLength(FlagBuf,cnt1); - end; + end; //----- Status bar ----- -- cgit v1.2.3