diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7071eee3f2..8578391a5b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-05-25 14:57 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbclipsm/date.c + ! Fixed internal error in MDY(), DMY(). Thanks Petr. + ! DMY() extra space removed. + 2008-05-25 02:25 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * doc/whatsnew.txt + Uploaded Przemek's detailed 1.1.1 Harbour change listing. diff --git a/harbour/contrib/hbclipsm/date.c b/harbour/contrib/hbclipsm/date.c index 51ff9d9608..0b9a23c451 100644 --- a/harbour/contrib/hbclipsm/date.c +++ b/harbour/contrib/hbclipsm/date.c @@ -74,9 +74,9 @@ HB_FUNC( MDY ) iYearLen = hb_setGetCentury() ? 4 : 2; iBufferLen = iLen + 5 + iYearLen; - szReturn = ( char * ) hb_xgrab( iBufferLen ); + szReturn = ( char * ) hb_xgrab( iBufferLen + 1 ); - memset( szReturn, ' ', iBufferLen + 1 ); + memset( szReturn, ' ', iBufferLen ); memcpy( szReturn, hb_dateCMonth( iMonth ), iLen ); memcpy( szReturn + iLen + 1, szFormatted + 3, 2 ); szReturn[ iLen + 3 ] = ','; @@ -103,8 +103,8 @@ HB_FUNC( DMY ) iLen = strlen( hb_dateCMonth( iMonth ) ); iYearLen = hb_setGetCentury() ? 4 : 2; - iBufferLen = iLen + 5 + iYearLen; - szReturn = ( char * ) hb_xgrab( iBufferLen ); + iBufferLen = iLen + 4 + iYearLen; + szReturn = ( char * ) hb_xgrab( iBufferLen + 1 ); memset( szReturn, ' ', iBufferLen ); memcpy( szReturn, szFormatted + 3, 2 );