Skip to content

Commit a2f3b82

Browse files
committed
Fix DefineSyntaxError
1 parent 1dda809 commit a2f3b82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/PythonEngine.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -5129,7 +5129,7 @@ procedure TPythonEngine.RaiseError;
51295129
if Assigned(tmp) and PyUnicode_Check(tmp) then
51305130
s_value := PyUnicodeAsString(tmp);
51315131
Py_XDECREF(tmp);
5132-
if MajorVersion >= 10 then
5132+
if (MajorVersion > 3) or (MinorVersion >= 10) then
51335133
begin
51345134
// Get the end offset of the error
51355135
tmp := PyObject_GetAttrString(err_value, 'end_offset' );

0 commit comments

Comments
 (0)