Skip to content

Commit e723d4c

Browse files
Use the zero based methods in the harness.
1 parent 873e4e3 commit e723d4c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/harness/harness.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,13 +1184,13 @@ module Harness {
11841184
}
11851185

11861186
export function getMinimalDiagnostic(err: ts.Diagnostic): HarnessDiagnostic {
1187-
var errorLineInfo = err.file ? err.file.getOneBasedLineAndCharacterOfPosition(err.start) : { line: 0, character: 0 };
1187+
var errorLineInfo = err.file ? err.file.getZeroBasedLineAndCharacterOfPosition(err.start) : { line: -1, character: -1 };
11881188
return {
11891189
fileName: err.file && err.file.fileName,
11901190
start: err.start,
11911191
end: err.start + err.length,
1192-
line: errorLineInfo.line,
1193-
character: errorLineInfo.character,
1192+
line: errorLineInfo.line + 1,
1193+
character: errorLineInfo.character + 1,
11941194
message: ts.flattenDiagnosticMessageText(err.messageText, ts.sys.newLine),
11951195
category: ts.DiagnosticCategory[err.category].toLowerCase(),
11961196
code: err.code

0 commit comments

Comments
 (0)