Skip to content

Commit c233195

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Src/UEncodings.pas

Lines changed: 1 addition & 1 deletion
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)