mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-09 19:11:38 -07:00
fix one-sided bounds check in text containing-scope binary search
This commit is contained in:
@@ -2132,7 +2132,7 @@ txt_scope_node_from_info_off(TXT_TextInfo *info, U64 off)
|
||||
scope_n != &txt_scope_node_nil;
|
||||
scope_n = txt_scope_node_from_info_num(info, scope_n->parent_num))
|
||||
{
|
||||
if(off < info->tokens.v[scope_n->token_idx_range.max].range.max)
|
||||
if(info->tokens.v[scope_n->token_idx_range.min].range.min <= off && off < info->tokens.v[scope_n->token_idx_range.max].range.max)
|
||||
{
|
||||
result = scope_n;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user