From ee3ac64afb79c0244648b119ee94a84710ef1596 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 26 Jan 2009 09:04:37 +0000 Subject: [PATCH] * Hopefully fixed argument size problem on 64-bit windows git-svn-id: trunk@12601 - --- packages/fcl-xml/src/xmliconv_windows.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/fcl-xml/src/xmliconv_windows.pas b/packages/fcl-xml/src/xmliconv_windows.pas index f7c18fce51..796bf59269 100644 --- a/packages/fcl-xml/src/xmliconv_windows.pas +++ b/packages/fcl-xml/src/xmliconv_windows.pas @@ -38,9 +38,12 @@ function errno_location: PInteger; cdecl; external 'msvcrt.dll' name '_errno'; function Iconv_Decode(Context: Pointer; InBuf: PChar; var InCnt: Cardinal; OutBuf: PWideChar; var OutCnt: Cardinal): Integer; stdcall; var OutChars: size_t; + InChars : size_t; begin OutChars := OutCnt * sizeof(WideChar); - Result := iconv(Context, @InBuf, InCnt, @OutBuf, OutChars); + InChars:=InCnt; + Result := iconv(Context, @InBuf, InChars, @OutBuf, OutChars); + InCnt:=InChars; OutCnt := OutChars div sizeof(WideChar); if Result = -1 then begin