Skip to content

Commit bcc9277

Browse files
committed
fix for last diff
1 parent 70662b0 commit bcc9277

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python4lazarus/Sources/Core/PythonEngine.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6338,7 +6338,7 @@ function TPythonEngine.PyUnicode_FromWideString( const AString : UnicodeString)
63386338
{$IFDEF unix}
63396339
// Note that Linux uses UCS4 strings, whereas it declares using UCS2 strings!!!
63406340
_ucs4Str := WideStringToUCS4String(AString);
6341-
Result := PyUnicode_FromWideChar( {PWideChar}(@_ucs4Str[0]), Length(_ucs4Str) );
6341+
Result := PyUnicode_FromWideChar( {PWideChar}(@_ucs4Str[0]), Length(_ucs4Str)-1 {trim trailing zero});
63426342
{$ELSE}
63436343
Result := PyUnicode_FromWideChar( PWideChar(AString), Length(AString) );
63446344
{$ENDIF}

0 commit comments

Comments
 (0)