Skip to content

Commit

Permalink
Possible fix for category table issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoBiscosi committed Jan 22, 2025
1 parent 0610321 commit 2e0e315
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/lua/modules/categories_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ function categories_utils.get_category_protocols_list(cat_id, return_list)
local res = {}
local max_protocols_in_list = 5
local proto_list = interface.getnDPIProtocols(cat_id) or {}
for proto_name, proto_id in pairsByKeys(proto_list, asc_insensitive) do
res[#res + 1] = proto_name
if proto_list and table.len(proto_list) > 0 then
for proto_name, proto_id in pairsByKeys(proto_list, asc_insensitive) do
res[#res + 1] = proto_name
end
end

local overflown_protos
Expand Down

0 comments on commit 2e0e315

Please sign in to comment.