mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-13 11:40:29 +00:00
Fix a crash in rednet repeat
This crash can be triggered remotely by specially constructed rednet messages, making this a bit of a problem, as any repeaters can be remotely crashed.
This commit is contained in:
parent
914df8b0c7
commit
b008edae90
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user