Skip to content

Commit

Permalink
Merge pull request dan200#573 from osmarks/ComputerCraft/patch-1
Browse files Browse the repository at this point in the history
Fix a crash in rednet `repeat`
  • Loading branch information
SquidDev committed Sep 9, 2018
2 parents c6bd88f + b008eda commit ee4735c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ local ok, error = pcall( function()
if sEvent == "modem_message" then
-- Got a modem message, rebroadcast it if it's a rednet thing
if nChannel == rednet.CHANNEL_REPEAT then
if type( tMessage ) == "table" and tMessage.nMessageID and tMessage.nRecipient then
if type( tMessage ) == "table" and tMessage.nMessageID and tMessage.nRecipient and type(tMessage.nRecipient) == "number" then
if not tReceivedMessages[ tMessage.nMessageID ] then
-- Ensure we only repeat a message once
tReceivedMessages[ tMessage.nMessageID ] = true
Expand Down

0 comments on commit ee4735c

Please # to comment.