Skip to content

Commit 47a93ca

Browse files
committed
small fix
1 parent 6d61714 commit 47a93ca

File tree

1 file changed

+4
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/compiler

1 file changed

+4
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/compiler/SourceMap.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -198,6 +198,9 @@ public void appendLocation(int startLine, int startColumn, int endLine, int endC
198198
if (endLine == 0) {
199199
endLine = startLine;
200200
}
201+
if (endColumn == 0) {
202+
endColumn = startColumn;
203+
}
201204
assert startLine >= 0 && endLine >= startLine && (startLine != endLine || endColumn >= startColumn);
202205
int lineDelta = startLine - lastLine;
203206
int lineSpan = endLine - startLine;

0 commit comments

Comments
 (0)