mirror of
https://github.com/kepler155c/opus
synced 2025-12-03 23:18:06 +00:00
fix invalid msg crashing socket
This commit is contained in:
@@ -20,6 +20,8 @@ function Config.load(fname, data)
|
||||
|
||||
Util.merge(data, contents)
|
||||
end
|
||||
|
||||
return data
|
||||
end
|
||||
|
||||
function Config.loadWithCheck(fname, data)
|
||||
@@ -36,7 +38,7 @@ function Config.loadWithCheck(fname, data)
|
||||
shell.run('edit ' .. filename)
|
||||
end
|
||||
|
||||
Config.load(fname, data)
|
||||
return Config.load(fname, data)
|
||||
end
|
||||
|
||||
function Config.update(fname, data)
|
||||
|
||||
@@ -183,7 +183,7 @@ function Socket.server(port)
|
||||
local _, _, sport, dport, msg = os.pullEvent('modem_message')
|
||||
|
||||
if sport == port and
|
||||
msg and
|
||||
msg and type(msg) == 'table' and
|
||||
msg.dhost == os.getComputerID() and
|
||||
msg.type == 'OPEN' then
|
||||
|
||||
|
||||
Reference in New Issue
Block a user