From 7fc1bb8e59eddbed44e626105164ac557ee4de8b Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Fri, 18 Sep 2009 11:10:04 +0000 Subject: [PATCH] 2009-09-18 13:09 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbwin/win_com.c ! fixed unicode translation - trailing 0 was not set --- harbour/ChangeLog | 4 ++++ harbour/contrib/hbwin/win_com.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6816a86ce8..324728be27 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,10 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-18 13:09 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbwin/win_com.c + ! fixed unicode translation - trailing 0 was not set + 2009-09-18 12:40 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * source/rtl/hbsocket.c - Reverted patch committed in 2009-09-18 12:19. It was diff --git a/harbour/contrib/hbwin/win_com.c b/harbour/contrib/hbwin/win_com.c index ec01372d62..47efa9cf18 100644 --- a/harbour/contrib/hbwin/win_com.c +++ b/harbour/contrib/hbwin/win_com.c @@ -89,7 +89,7 @@ HB_FUNC( WIN_COMOPEN ) DCB NewDCB; hb_snprintf( szName, sizeof( szName ), "\\\\.\\COM%d", iPort + 1 ); - HB_TCHAR_SETTO( tszName, szName, strlen( szName ) ); + HB_TCHAR_CPTO( tszName, szName, sizeof( tszName ) - 1 ); s_PortData[ iPort ].hPort = INVALID_HANDLE_VALUE; s_PortData[ iPort ].iFunction = FCNCREATEFILE;