From e18e136f8233e9a68e9079a259b8bbb5533402b3 Mon Sep 17 00:00:00 2001 From: Nikita Date: Mon, 22 Jul 2024 15:59:50 -0700 Subject: [PATCH] fixed line number binary search for last range in line number map --- src/lib_rdi_format/rdi_format_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_rdi_format/rdi_format_parse.c b/src/lib_rdi_format/rdi_format_parse.c index 9a2769fb..a7173610 100644 --- a/src/lib_rdi_format/rdi_format_parse.c +++ b/src/lib_rdi_format/rdi_format_parse.c @@ -393,7 +393,7 @@ rdi_line_voffs_from_num(RDI_ParsedSourceLineMap *map, RDI_U32 linenum, RDI_U32 * { RDI_U32 first = map->ranges[closest_i]; RDI_U32 opl = map->ranges[closest_i + 1]; - if(opl < map->voff_count) + if(opl <= map->voff_count) { result = map->voffs + first; *n_out = opl - first;