2009-08-09 11:07 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* source/rtl/rat.c
    ! HB_RAT() fixed to not ignore nEnd parameter if it's out of bound.
      In such case it will now return zero ("not found").
      Mindaugas, please verify if this is what you proposed.
This commit is contained in:
Viktor Szakats
2009-08-09 09:07:48 +00:00
parent 18da83f277
commit 3baef883ea
2 changed files with 13 additions and 12 deletions

View File

@@ -17,6 +17,12 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-08-09 11:07 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* source/rtl/rat.c
! HB_RAT() fixed to not ignore nEnd parameter if it's out of bound.
In such case it will now return zero ("not found").
Mindaugas, please verify if this is what you proposed.
2009-08-09 10:26 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/gtwvg/gtwvg.hbc
! Fixed missing incpaths= line.

View File

@@ -76,11 +76,11 @@ HB_FUNC( RAT )
hb_retnl( bFound ? lPos + 2 : 0 );
}
else
hb_retni( 0 );
hb_retnl( 0 );
}
else
/* This function never seems to raise an error */
hb_retni( 0 );
hb_retnl( 0 );
}
HB_FUNC( HB_RAT )
@@ -111,15 +111,10 @@ HB_FUNC( HB_RAT )
if( HB_ISNUM( 4 ) )
{
long lEnd = hb_parnl( 4 );
long lEnd = hb_parnl( 4 ) - 1;
if( lEnd >= 1 )
{
--lEnd;
if( lEnd < lPos )
lPos = lEnd;
}
if( lEnd < lPos )
lPos = lEnd;
}
while( lPos >= lStart && !bFound )
@@ -132,9 +127,9 @@ HB_FUNC( HB_RAT )
hb_retnl( bFound ? lPos + 2 : 0 );
}
else
hb_retni( 0 );
hb_retnl( 0 );
}
else
/* This function never seems to raise an error */
hb_retni( 0 );
hb_retnl( 0 );
}