summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-25 17:07:09 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-25 17:07:09 -0500
commita56f549a266e14cdc00a98e8dc3e154f5ac6c23e (patch)
treeb513d9bbf656fe1ac054e3201fe10ac94de461ef /buffer.c
parentf6d49d377ac136fc29457b3b4501f0488b6412e3 (diff)
error box; generally better error handling
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/buffer.c b/buffer.c
index 422f03c..03d9b9e 100644
--- a/buffer.c
+++ b/buffer.c
@@ -1895,7 +1895,7 @@ void buffer_render(TextBuffer *buffer, float x1, float y1, float x2, float y2) {
sel_start = buffer->selection_pos;
} else assert(0);
- for (u32 line_idx = maxu32(sel_start.line, start_line); line_idx <= sel_end.line; ++line_idx) {
+ for (u32 line_idx = max_u32(sel_start.line, start_line); line_idx <= sel_end.line; ++line_idx) {
Line *line = &buffer->lines[line_idx];
u32 index1 = line_idx == sel_start.line ? sel_start.index : 0;
u32 index2 = line_idx == sel_end.line ? sel_end.index : line->len;