Skip to content

Commit

Permalink
Merge pull request #5205 from dodona-edu/fix/line-not-shown
Browse files Browse the repository at this point in the history
Fix line of code not shown on invalid judge output
  • Loading branch information
jorg-vr authored Nov 29, 2023
2 parents bb4aa2c + 4b2cfb7 commit 186a4ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class LineOfCode extends ShadowlessLitElement {
mergeRanges(ranges: { start: number, length: number, index: number }[]): { start: number, length: number, indexes: number[] }[] {
const annotationsByPosition: number[][] = new Array(this.codeLength).fill(null).map(() => []);
for (const range of ranges) {
for (let i = range.start; i < range.start + range.length; i++) {
for (let i = range.start; i < range.start + range.length && i < this.codeLength; i++) {
annotationsByPosition[i].push(range.index);
}
}
Expand Down

0 comments on commit 186a4ae

Please sign in to comment.