diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 12466a5fc9..39e650b4e8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,10 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-11 20:25 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbwin/win_regc.c + ! WIN_REGSETVALUEEX(): Off by one bug fixed in prev commit. + 2009-12-11 20:16 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/wapi_winbase.c * Eliminated hb_parclen() call in WAPI_FORMATMESSAGE() function. diff --git a/harbour/contrib/hbwin/win_regc.c b/harbour/contrib/hbwin/win_regc.c index e47aa13fea..da0fc66fc5 100644 --- a/harbour/contrib/hbwin/win_regc.c +++ b/harbour/contrib/hbwin/win_regc.c @@ -204,6 +204,8 @@ HB_FUNC( WIN_REGSETVALUEEX ) HB_SIZE nValueLen; LPCTSTR lpValue = HB_PARSTR( 5, &hValue, &nValueLen ); + ++nValueLen; + #if defined( UNICODE ) nValueLen *= 2; #endif @@ -213,7 +215,7 @@ HB_FUNC( WIN_REGSETVALUEEX ) 0, dwType, ( const BYTE * ) lpValue, - ( DWORD ) nValueLen + 1 ) == ERROR_SUCCESS ); + ( DWORD ) nValueLen ) == ERROR_SUCCESS ); hb_strfree( hValue ); }