Skip to content

Commit e43816c

Browse files
committed
Fix out of range bug in UEncodings unit
Bug in 1st WideCharToMultiByte call in WideCharToChar function. Fixes #97
1 parent 088ad57 commit e43816c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Src/UEncodings.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ function WideCharToChar(const Source: WideChar; const CodePage: Integer;
439439
BufSize: Integer;
440440
begin
441441
BufSize := WideCharToMultiByte(
442-
CodePage, 0, @Source, 1, @Dest[0], 0, nil, nil
442+
CodePage, 0, @Source, 1, nil, 0, nil, nil
443443
);
444444
SetLength(Dest, BufSize + 1);
445445
if WideCharToMultiByte(

0 commit comments

Comments
 (0)