diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 060c833fbf..f0f62474b5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,13 @@ The license applies to all entries newer than 2009-04-28. */ +2011-01-17 22:55 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbmxml/hbmxml.c + ! fixed hb_strdup() wrongly used instead of strdup() + Thanks to Petr for the information. + * modified MXMLSAVESTRING() to follow recent Viktor modifications in + MXMLSAVEALLOCSTRING() and not strip trailing EOL + 2011-01-17 20:52 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbmxml/hbmxml.c % In MXMLSAVEALLOCSTRING() strdup()-ed buffer passed directly diff --git a/harbour/contrib/hbmxml/hbmxml.c b/harbour/contrib/hbmxml/hbmxml.c index a232d66dba..a3b6af5b29 100644 --- a/harbour/contrib/hbmxml/hbmxml.c +++ b/harbour/contrib/hbmxml/hbmxml.c @@ -1485,7 +1485,7 @@ HB_FUNC( MXMLSAVESTRING ) bytes = mxmlSaveString( node, buffer, ( int ) ( buffer_size + 1 ), cb ); if( bytes > 0 && ( HB_SIZE ) bytes <= buffer_size ) - hb_storclen( buffer, bytes - 1, 2 ); /* Without EoL */ + hb_storclen( buffer, bytes, 2 ); hb_retni( bytes ); @@ -1851,7 +1851,7 @@ static char * custom_save_cb( mxml_node_t * node ) hb_vmSend( 1 ); pszText = hb_parstr_utf8( -1, &hText, NULL ); - pszResult = pszText ? hb_strdup( pszText ) : NULL; + pszResult = pszText ? strdup( pszText ) : NULL; hb_strfree( hText ); hb_vmRequestRestore();