From bec3dd7749776e2dce407b1758f07ff551c2a6c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Mon, 4 May 2015 12:41:25 +0200 Subject: [PATCH] 2015-05-04 12:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbmemio/memio.c ! fixed GPF in hb_VFDirectory( "mem:..." ) - many thanks to Rolf for locating the problem and fix. --- ChangeLog.txt | 5 +++++ contrib/hbmemio/memio.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index f86ebd60c6..08ff6f5847 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,11 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-05-04 12:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * contrib/hbmemio/memio.c + ! fixed GPF in hb_VFDirectory( "mem:..." ) - many thanks to Rolf for + locating the problem and fix. + 2015-04-27 17:21 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rdd/workarea.c ! fixed typo in RDDI_AUTOORDER type - it should be numeric diff --git a/contrib/hbmemio/memio.c b/contrib/hbmemio/memio.c index 9fbde715cb..d6c1c7b939 100644 --- a/contrib/hbmemio/memio.c +++ b/contrib/hbmemio/memio.c @@ -110,8 +110,8 @@ typedef struct _HB_MEMFS_FILE typedef struct _HB_MEMFS_FS { - HB_ULONG ulInodeCount; - HB_ULONG ulInodeAlloc; + HB_ULONG ulInodeCount; + HB_ULONG ulInodeAlloc; PHB_MEMFS_INODE * pInodes; HB_ULONG ulFileAlloc; HB_ULONG ulFileLast; @@ -413,7 +413,7 @@ HB_MEMFS_EXPORT PHB_ITEM hb_memfsDirectory( const char * pszDirSpec, const char pDirArray = hb_itemArrayNew( nLen ); for( ul = 0; ( HB_SIZE ) ul < nLen; ul++ ) { - PHB_ITEM pSubarray = hb_arrayGetItemPtr( pDirArray, ++nLen ); + PHB_ITEM pSubarray = hb_arrayGetItemPtr( pDirArray, ul + 1 ); hb_arrayNew ( pSubarray, F_LEN ); hb_arraySetCPtr( pSubarray, F_NAME, pDirEn[ ul ].szName );