From 9d1552d1cc7915ab8c4066a5cb57a2636bbabe55 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 9 May 2012 14:15:50 +0000 Subject: [PATCH] 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 --- harbour/ChangeLog | 5 +++++ harbour/src/common/hbdate.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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