Re: [comctl32] Reduce memory usage of the syslink control
30 Dec
2005
30 Dec
'05
11:56 a.m.
Thomas Weidenmueller wrote:
@@ -135,16 +141,16 @@ SL_ITEM_TYPE type, PDOC_ITEM LastItem) { PDOC_ITEM Item; - Item = Alloc(sizeof(DOC_ITEM) + ((textlen + 1) * sizeof(WCHAR))); + + textlen = min(textlen, lstrlenW(Text)); + Item = Alloc(FIELD_OFFSET(DOC_ITEM, Text[0]) + ((textlen + 1) * sizeof(WCHAR)));
This line can be written simpler as: Item = Alloc(FIELD_OFFSET(DOC_ITEM, Text[textlen + 1])); -- Rob Shearman
7288
Age (days ago)
7288
Last active (days ago)
0 comments
1 participants
participants (1)
-
Robert Shearman