diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3e1a86f52b..2b5b0641e2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2012-03-29 00:06 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * harbour/src/vm/itemapi.c + % removed redundant trailing 0 setting + + * harbour/src/rtl/fslink.c + ! fixed hb_osDecodeCP() usage + + * harbour/ChangeLog + * marked last TOFIX as [DONE] + 2012-03-28 23:56 UTC+0200 Viktor Szakats (harbour syenar.net) * src/rtl/fslink.c + use hb_vmUnlock()/hb_vmLock() @@ -35,7 +45,7 @@ directories on win. + HB_FLINKREAD()/hb_fsLinkRead() now returns value in core codepage. TOFIX: It crashes now on *nix, after hours of trying I give up, - please review the hb_osDecodeCP() call and fix it. + please review the hb_osDecodeCP() call and fix it. [DONE] ; TODO: this leaves only one HB_TCHAR_COPYFROM() macro in this file. * tests/flink.prg diff --git a/harbour/src/rtl/fslink.c b/harbour/src/rtl/fslink.c index c95f569dca..a9e364a4ef 100644 --- a/harbour/src/rtl/fslink.c +++ b/harbour/src/rtl/fslink.c @@ -372,20 +372,8 @@ char * hb_fsLinkRead( const char * pszFile ) } /* Convert from OS codepage */ - if( HB_FALSE ) - { - char * pszFree = NULL; - char * pszResult; - HB_SIZE nLen = strlen( pszLink ); - - pszResult = ( char * ) hb_osDecodeCP( pszLink, &pszFree, &nLen ); - - if( pszResult != pszLink ) - { - hb_xfree( pszLink ); - pszLink = pszResult; - } - } + if( pszLink ) + pszLink = ( char * ) hb_osDecodeCP( pszLink, NULL, NULL ); return pszLink; } diff --git a/harbour/src/vm/itemapi.c b/harbour/src/vm/itemapi.c index 49b8d94b96..44f0e272b1 100644 --- a/harbour/src/vm/itemapi.c +++ b/harbour/src/vm/itemapi.c @@ -402,7 +402,6 @@ PHB_ITEM hb_itemPutCPtr( PHB_ITEM pItem, char * szText ) } else { - szText[ nLen ] = '\0'; pItem->item.asString.allocated = nLen + 1; pItem->item.asString.value = szText; }