Skip to content

Commit ee4735c

Browse files
committed
Merge pull request dan200#573 from osmarks/ComputerCraft/patch-1
Fix a crash in rednet `repeat`
2 parents c6bd88f + b008eda commit ee4735c

File tree

1 file changed

+1
-1
lines changed
  • src/main/resources/assets/computercraft/lua/rom/programs/rednet

1 file changed

+1
-1
lines changed

src/main/resources/assets/computercraft/lua/rom/programs/rednet/repeat.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ local ok, error = pcall( function()
4444
if sEvent == "modem_message" then
4545
-- Got a modem message, rebroadcast it if it's a rednet thing
4646
if nChannel == rednet.CHANNEL_REPEAT then
47-
if type( tMessage ) == "table" and tMessage.nMessageID and tMessage.nRecipient then
47+
if type( tMessage ) == "table" and tMessage.nMessageID and tMessage.nRecipient and type(tMessage.nRecipient) == "number" then
4848
if not tReceivedMessages[ tMessage.nMessageID ] then
4949
-- Ensure we only repeat a message once
5050
tReceivedMessages[ tMessage.nMessageID ] = true

0 commit comments

Comments
 (0)