From 13e18f3451900e544d24302de043e1262eb58585 Mon Sep 17 00:00:00 2001 From: Examnes Date: Sat, 16 Sep 2023 16:17:35 +0400 Subject: [PATCH] Fix: responce was interpritated as function call --- RPC/OpenOS/usr/lib/rpc.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RPC/OpenOS/usr/lib/rpc.lua b/RPC/OpenOS/usr/lib/rpc.lua index 31f734d..764d359 100644 --- a/RPC/OpenOS/usr/lib/rpc.lua +++ b/RPC/OpenOS/usr/lib/rpc.lua @@ -62,6 +62,9 @@ function rpc.register(name,fn) event.listen("net_msg",function(_, from, port, data) if port == rpc.port then local rpcrq = serial.unserialize(data) + if #rpcrq ~= 3 then + return + end local rpcn, rpcid = table.remove(rpcrq,1), table.remove(rpcrq,1) if rpcf[rpcn] and isPermitted(from,rpcn) then local rt = {pcall(rpcf[rpcn],table.unpack(rpcrq))}