From 63cccbddfac0b86c8235857e3f15bd53cbee9244 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 22 Oct 2008 17:13:27 +0000 Subject: [PATCH] 2008-10-22 19:13 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/thread.c ! fixed memory allocation in HB_THREADWAIT() when more then 16 threads were specified --- harbour/ChangeLog | 5 +++++ harbour/source/vm/thread.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c826421638..95d0012680 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-22 19:13 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/vm/thread.c + ! fixed memory allocation in HB_THREADWAIT() when more then 16 + threads were specified + 2008-10-22 17:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/bin/hbmk.bat * simple modification to make beginning hbmk parameters (-mt and -gui) diff --git a/harbour/source/vm/thread.c b/harbour/source/vm/thread.c index be97c91cbf..6ea5bbaecb 100644 --- a/harbour/source/vm/thread.c +++ b/harbour/source/vm/thread.c @@ -917,8 +917,11 @@ HB_FUNC( HB_THREADWAIT ) break; } if( pThreads == pAlloc && iThreads >= HB_THREAD_WAIT_ALLOC ) + { pThreads = ( PHB_THREADSTATE * ) - hb_xgrab( sizeof( PHB_THREADSTATE ) * iThreads ); + hb_xgrab( sizeof( PHB_THREADSTATE ) * iLen ); + memcpy( pThreads, pAlloc, sizeof( pAlloc ) ); + } pThreads[ iThreads++ ] = pThread; } }