mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 04:09:11 +02:00
* Hopefully fixed argument size problem on 64-bit windows
git-svn-id: trunk@12601 -
This commit is contained in:
parent
8adbb96141
commit
ee3ac64afb
@ -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;
|
function Iconv_Decode(Context: Pointer; InBuf: PChar; var InCnt: Cardinal; OutBuf: PWideChar; var OutCnt: Cardinal): Integer; stdcall;
|
||||||
var
|
var
|
||||||
OutChars: size_t;
|
OutChars: size_t;
|
||||||
|
InChars : size_t;
|
||||||
begin
|
begin
|
||||||
OutChars := OutCnt * sizeof(WideChar);
|
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);
|
OutCnt := OutChars div sizeof(WideChar);
|
||||||
if Result = -1 then
|
if Result = -1 then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user