diff options
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h index e9dd01c..7659322 100644 --- a/src/common.h +++ b/src/common.h @@ -27,9 +27,14 @@ struct line_view { size_t i = 0; size_t j = 0; while (i < length && j < lv.length) { - if (line[i++] < line[j++]) { + if (line[i] < lv.line[j]) { return true; } + if (line[i] > lv.line[j]) { + return false; + } + i++; + j++; } return j < lv.length; } |