From 1d1ae13d827e312e87a39f06d94aff283b623308 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sun, 29 Sep 2019 19:05:34 -0700 Subject: [PATCH] WEIRD PROBLEM NOT SURE WHERE IT CAME FROM fix --- 4coder_token.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4coder_token.cpp b/4coder_token.cpp index e7748fb8..a5adb586 100644 --- a/4coder_token.cpp +++ b/4coder_token.cpp @@ -79,7 +79,7 @@ token_index_from_pos(Token *tokens, i64 count, i64 pos){ for (;;){ i64 index = (first + one_past_last) >> 1; i64 index_pos = tokens[index].pos; - if (index_pos > p){ + if (index_pos > pos){ one_past_last = index; } else if (index_pos + tokens[index].size <= pos){