Skip to content

Commit

Permalink
Make luacheck happy
Browse files Browse the repository at this point in the history
  • Loading branch information
InfusOnWoW committed Sep 9, 2024
1 parent e92ef86 commit cad4376
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AceComm-3.0/AceComm-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ AceComm.multipart_reassemblers = nil
-- the multipart message spool: indexed by a combination of sender+distribution+
AceComm.multipart_spool = AceComm.multipart_spool or {}
-- Sequence is an integer between 0 and 254 * 254
AceComm.sequence = random(254 * 254)
AceComm.sequence = math.random(254 * 254)

--- Register for Addon Traffic on a specified prefix
-- @param prefix A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent), max 16 characters
Expand Down Expand Up @@ -136,7 +136,7 @@ function AceComm:SendCommMessage(prefix, text, distribution, target, prio, callb
print("chunkCount", chunkCount, "chunklen", chunklen)

-- Convert sequence number to 2 bytes, while avoiding \0 bytes
local sequence = string.char(AceComm.sequence % 254 + 1) .. string.char(floor(AceComm.sequence / 254) + 1)
local sequence = string.char(AceComm.sequence % 254 + 1) .. string.char(math.floor(AceComm.sequence / 254) + 1)
AceComm.sequence = (AceComm.sequence + 1) % (254 * 254)

for i = 1, chunkCount do
Expand Down

0 comments on commit cad4376

Please sign in to comment.