We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf3357e commit 79a7ac8Copy full SHA for 79a7ac8
1 file changed
PythonForDelphi/Components/Sources/Core/PythonEngine.pas
@@ -3196,8 +3196,15 @@ procedure MaskFPUExceptions(ExceptionsMasked : boolean;
3196
3197
implementation
3198
3199
+uses
3200
+{$IFDEF FPC}
3201
+ StrUtils,
3202
+{$ELSE}
3203
+ AnsiStrings,
3204
+{$ENDIF}
3205
{$IFDEF MSWINDOWS}
-uses Math, Registry;
3206
+ Math,
3207
+ Registry;
3208
{$ENDIF}
3209
3210
@@ -5235,7 +5242,7 @@ function TPythonEngine.CleanString(const s : AnsiString; AppendLF : Boolean) : A
5235
5242
while i > 0 do
5236
5243
begin
5237
5244
Delete( result, i, 1 );
5238
- i := Pos(AnsiString(CR),result, i);
5245
+ i := PosEx(AnsiString(CR),result, i);
5239
5246
end;
5240
5247
if AppendLF and (result[length(result)] <> LF) then
5241
5248
Insert( LF, result, length(result)+1 );
0 commit comments