diff options
| author | Guldoman <giulio.lettieri@gmail.com> | 2021-11-24 05:03:42 +0100 |
|---|---|---|
| committer | Francesco Abbate <francesco.bbt@gmail.com> | 2021-12-20 08:40:43 +0100 |
| commit | 23f83857c5634a3db3c9945261145d0b9f4f6705 (patch) | |
| tree | 725ce80f3e2640158245cfbab4c49be4685b9475 | |
| parent | 43a6e21135bbb93473ed215d952dc4e6018d0080 (diff) | |
| download | lite-xl-23f83857c5634a3db3c9945261145d0b9f4f6705.tar.gz lite-xl-23f83857c5634a3db3c9945261145d0b9f4f6705.zip | |
Don't search if there are no files
| -rw-r--r-- | data/core/init.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/data/core/init.lua b/data/core/init.lua index 4a16e6b7..6f3754e4 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -191,6 +191,7 @@ end local function file_search(files, info) local filename, type = info.filename, info.type local inf, sup = 1, #files + if sup <= 0 then return 1, false end while sup - inf > 8 do local curr = math.floor((inf + sup) / 2) if system.path_compare(filename, type, files[curr].filename, files[curr].type) then |
