diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c19ee7a52a..025a9642bd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-09-10 22:12 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rtl/hbtoken.c + ! fixed bad typo in hb_tokenCount() + * minor code cleanup + 2007-09-10 20:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/rdd_ads/ads1.c * changed HB_TR_ALWAYS to HB_TR_DEBUG in two places and diff --git a/harbour/source/rtl/hbtoken.c b/harbour/source/rtl/hbtoken.c index e2af2be120..092ab14063 100644 --- a/harbour/source/rtl/hbtoken.c +++ b/harbour/source/rtl/hbtoken.c @@ -77,7 +77,8 @@ static ULONG hb_tokenCount( char * szLine, ULONG ulLen, ++ulTokens; if( ulDelim == 1 && *szDelim == ' ' ) { - while( ++ul < ulLen && szLine[ ul ] == ' ' ); + while( ul + 1 < ulLen && szLine[ ul + 1 ] == ' ' ) + ++ul; } ul += ulDelim - 1; } @@ -115,7 +116,7 @@ static char * hb_tokenGet( char * szLine, ULONG ulLen, } if( ulDelim == 1 && *szDelim == ' ' ) { - while( ul < ulLen && szLine[ ul + 1 ] == ' ' ) + while( ul + 1 < ulLen && szLine[ ul + 1 ] == ' ' ) ++ul; } ulStart = ul + ulDelim; @@ -159,7 +160,7 @@ static PHB_ITEM hb_tokenArray( char * szLine, ULONG ulLen, hb_itemPutCL( hb_arrayGetItemPtr( pArray, ++ulToken ), szLine + ulStart, ul - ulStart ); if( ulDelim == 1 && *szDelim == ' ' ) { - while( ul < ulLen && szLine[ ul + 1 ] == ' ' ) + while( ul + 1 < ulLen && szLine[ ul + 1 ] == ' ' ) ++ul; } ulStart = ul + ulDelim;