diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 54b1a4063d..6427191d76 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2012-05-09 16:14 UTC+0200 Viktor Szakats (harbour syenar.net) + * src/common/hbdate.c + ! hb_dateStrPut() fixed to never put non-digits in the + result. F.e. in this case: ? 0d19700101 + 1100000000 + 2012-05-09 11:24 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbqt/qtgui/hbqt_init.cpp ! use C syntax where C++ is not required diff --git a/harbour/src/common/hbdate.c b/harbour/src/common/hbdate.c index 22f4656eed..4bd366a4ee 100644 --- a/harbour/src/common/hbdate.c +++ b/harbour/src/common/hbdate.c @@ -281,10 +281,10 @@ void hb_dateStrPut( char * szDate, int iYear, int iMonth, int iDay ) szDate[ 2 ] = ( char ) ( ( ( iYear / 10 ) % 10 ) + '0' ); szDate[ 3 ] = ( char ) ( ( iYear % 10 ) + '0' ); - szDate[ 4 ] = ( char ) ( ( iMonth / 10 ) + '0' ); + szDate[ 4 ] = ( char ) ( ( ( iMonth / 10 ) % 10 ) + '0' ); szDate[ 5 ] = ( char ) ( ( iMonth % 10 ) + '0' ); - szDate[ 6 ] = ( char ) ( ( iDay / 10 ) + '0' ); + szDate[ 6 ] = ( char ) ( ( ( iDay / 10 ) % 10 ) + '0' ); szDate[ 7 ] = ( char ) ( ( iDay % 10 ) + '0' ); } else