Erich Hoover : hhctrl.ocx: Fix (re)allocating string blocks.
Module: wine Branch: master Commit: 207ce6fcb28accbc6dbfaf7bc0e3373606ac09cb URL: http://source.winehq.org/git/wine.git/?a=commit;h=207ce6fcb28accbc6dbfaf7bc0... Author: Erich Hoover <ehoover(a)mines.edu> Date: Thu Jan 28 16:18:33 2010 -0700 hhctrl.ocx: Fix (re)allocating string blocks. --- dlls/hhctrl.ocx/chm.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index b7df8e7..3e148db 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -38,12 +38,13 @@ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset) return NULL; if(chm->strings_size <= (offset >> BLOCK_BITS)) { + chm->strings_size = (offset >> BLOCK_BITS)+1; if(chm->strings) chm->strings = heap_realloc_zero(chm->strings, - chm->strings_size = ((offset >> BLOCK_BITS)+1)*sizeof(char*)); + chm->strings_size*sizeof(char*)); else chm->strings = heap_alloc_zero( - chm->strings_size = ((offset >> BLOCK_BITS)+1)*sizeof(char*)); + chm->strings_size*sizeof(char*)); }
participants (1)
-
Alexandre Julliard