From 72e3973cf939a1a3e9bb91d97f9376a0a572d312 Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Tue, 2 May 2017 16:44:43 +0800 Subject: [PATCH] decode response nil --- lualib-src/sproto/lsproto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lualib-src/sproto/lsproto.c b/lualib-src/sproto/lsproto.c index 70437931..d7160a62 100644 --- a/lualib-src/sproto/lsproto.c +++ b/lualib-src/sproto/lsproto.c @@ -451,7 +451,8 @@ ldecode(lua_State *L) { size_t sz; int r; if (st == NULL) { - return luaL_argerror(L, 1, "Need a sproto_type object"); + // return nil + return 0; } sz = 0; buffer = getbuffer(L, 2, &sz);