summaryrefslogtreecommitdiff
path: root/plugins/QuickSearch/i_ok.inc
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2014-01-17 12:28:10 +0000
committerAlexey Kulakov <panda75@bk.ru>2014-01-17 12:28:10 +0000
commitf62331d17c8266e36071ebcf096c151c34ea487d (patch)
tree6d43f764ba17a52f8684ea27e2f7b27a2e06232b /plugins/QuickSearch/i_ok.inc
parenta0e1ac74673f20bb4692b7523ce0c966769dde2c (diff)
small changes (defaults, initialization)
git-svn-id: http://svn.miranda-ng.org/main/trunk@7686 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/QuickSearch/i_ok.inc')
-rw-r--r--plugins/QuickSearch/i_ok.inc15
1 files changed, 7 insertions, 8 deletions
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 -----