From 195f996c1b5d634e09e55cd000688f8d333baac2 Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Tue, 11 Feb 2025 20:44:41 +0000 Subject: [PATCH] Fix icon search function in box_lib/filebrowser Consider a config file with the following two lines: abc=1 c=2 Previously, the first line matched *.c files, because it had the 'c=1' substring. Now we skip until the next line as soon as 'abc' doesn't match 'c'. --- programs/develop/libraries/box_lib/trunk/filebrowser.asm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/programs/develop/libraries/box_lib/trunk/filebrowser.asm b/programs/develop/libraries/box_lib/trunk/filebrowser.asm index e66ddaa90..afd1a0056 100644 --- a/programs/develop/libraries/box_lib/trunk/filebrowser.asm +++ b/programs/develop/libraries/box_lib/trunk/filebrowser.asm @@ -777,8 +777,13 @@ fb_get_icon_number: .search_association: cmp edx,eax jbe .end - mov esi,fb_extension_start inc eax + cmp byte[eax], 0xa + jne .search_association + inc eax + cmp edx,eax + jbe .end + mov esi,fb_extension_start mov ecx,eax mov ebx,eax cld