azerothcore/mod-eluna

If GossipMenuAddItem larger than 32 times, the server will crash.

Closed this issue · 1 comments

If GossipMenuAddItem larger than 32 times, the server will crash.
Can limit or give an error message to prevent it?

image
Confirmed with

local function hello(event, player, object)
    for n = 1, 40, 1 do
        player:GossipMenuAddItem(1, "Text "..n, 20124, n)
        print("added: "..n)
    end
    player:GossipSendMenu(0, object, 0)
end

RegisterCreatureGossipEvent(20124, 1, hello)