mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-07-05 11:32:53 +00:00
Merge pull request #573 from osmarks/ComputerCraft/patch-1
Fix a crash in rednet `repeat`
This commit is contained in:
commit
ee4735c17c
@ -44,7 +44,7 @@ local ok, error = pcall( function()
|
|||||||
if sEvent == "modem_message" then
|
if sEvent == "modem_message" then
|
||||||
-- Got a modem message, rebroadcast it if it's a rednet thing
|
-- Got a modem message, rebroadcast it if it's a rednet thing
|
||||||
if nChannel == rednet.CHANNEL_REPEAT then
|
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
|
if not tReceivedMessages[ tMessage.nMessageID ] then
|
||||||
-- Ensure we only repeat a message once
|
-- Ensure we only repeat a message once
|
||||||
tReceivedMessages[ tMessage.nMessageID ] = true
|
tReceivedMessages[ tMessage.nMessageID ] = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user