Fixed infinite loop in diagnostics
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-07-21 12:03:56 +02:00
parent bb6c7edcf2
commit 40e45b0112
2 changed files with 17 additions and 1 deletions

View File

@@ -57,7 +57,11 @@ size_t DiagnosticsHolder::GetLineFromPosition(size_t i) {
if (pos > i){
topLimit = half;
} else if (pos < i){
bottomLimit = half;
if (bottomLimit == half){
bottomLimit = half + 1;
} else{
bottomLimit = half;
}
} else{
return half;
}