Skip to content

Commit

Permalink
Issue #713: Change to use blockA loop structure that matches the othe…
Browse files Browse the repository at this point in the history
…r MName fileA search member functions
  • Loading branch information
Robert McLay committed Jul 16, 2024
1 parent af3648b commit 4063ec2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/MName.lua
Original file line number Diff line number Diff line change
Expand Up @@ -501,17 +501,17 @@ local function l_find_highest_by_key(self, key, fileA)
local pV = false
local wV = false
fileA = fileA or {}
local a
local blockA

for i = 1,#fileA do
a = fileA[i]
for j = 1,#fileA do
blockA = fileA[j]

for j = 1,#a do
local entry = a[j]
for i = 1,#blockA do
local entry = blockA[i]
local v = entry[key]
if (mrc:isVisible{fullName=entry.fullName,sn=entry.sn,fn=entry.fn} or isMarked(v)) then
if (v > weight) then
idx = j
idx = i
weight = v
pV = entry.pV
wV = entry.wV
Expand All @@ -521,8 +521,8 @@ local function l_find_highest_by_key(self, key, fileA)
if (idx) then break end
end
if (idx) then
fn = a[idx].fn
version = a[idx].version or false
fn = blockA[idx].fn
version = blockA[idx].version or false
found = true
self.__range = { pV, pV }
end
Expand Down

0 comments on commit 4063ec2

Please sign in to comment.