diff options
Diffstat (limited to 'plugins/HistoryPlusPlus/hpp_externalgrid.pas')
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_externalgrid.pas | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/HistoryPlusPlus/hpp_externalgrid.pas b/plugins/HistoryPlusPlus/hpp_externalgrid.pas index 2bf5dd6c8c..e0a5f3ea53 100644 --- a/plugins/HistoryPlusPlus/hpp_externalgrid.pas +++ b/plugins/HistoryPlusPlus/hpp_externalgrid.pas @@ -1246,7 +1246,6 @@ begin if Items[Index].Custom then
begin
ZeroMemory(@DBEventInfo, SizeOf(DBEventInfo));
- DBEventInfo.cbSize := SizeOf(DBEventInfo);
DBEventInfo.timestamp := Items[Index].CustomEvent.Time;
DBEventInfo.flags := DBEF_READ or DBEF_UTF;
if Items[Index].CustomEvent.Sent then
@@ -1255,7 +1254,7 @@ begin TextUTF := UTF8Encode(Items[Index].CustomEvent.Text) + #0;
DBEventInfo.cbBlob := Length(TextUTF) + 1;
DBEventInfo.pBlob := Pointer(PAnsiChar(TextUTF));
- Item.Size := Cardinal(DBEventInfo.cbSize) + Cardinal(DBEventInfo.cbBlob);
+ Item.Size := sizeof(DBEventInfo) + Cardinal(DBEventInfo.cbBlob);
end
else
begin
@@ -1264,14 +1263,14 @@ begin begin
DBEventInfo := GetEventInfo(hDBEvent);
DBEventInfo.szModule := nil;
- Item.Size := Cardinal(DBEventInfo.cbSize) + Cardinal(DBEventInfo.cbBlob);
+ Item.Size := sizeof(DBEventInfo) + Cardinal(DBEventInfo.cbBlob);
end;
end;
if Item.Size > 0 then
begin
GetMem(Item.Buffer, Item.Size);
- DataOffset := PAnsiChar(Item.Buffer) + DBEventInfo.cbSize;
- Move(DBEventInfo, Item.Buffer^, DBEventInfo.cbSize);
+ DataOffset := PAnsiChar(Item.Buffer) + sizeof(DBEventInfo);
+ Move(DBEventInfo, Item.Buffer^, sizeof(DBEventInfo));
Move(DBEventInfo.pBlob^, DataOffset^, DBEventInfo.cbBlob);
end;
end
|