diff options
| -rw-r--r-- | gtest/gtest_tsg_lua_exec_bytecode_file.cpp | 2 | ||||
| -rw-r--r-- | gtest/gtest_tsg_lua_exec_file.cpp | 2 | ||||
| -rw-r--r-- | src/tsg_lua_func.cpp | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/gtest/gtest_tsg_lua_exec_bytecode_file.cpp b/gtest/gtest_tsg_lua_exec_bytecode_file.cpp index f99298c..6e82120 100644 --- a/gtest/gtest_tsg_lua_exec_bytecode_file.cpp +++ b/gtest/gtest_tsg_lua_exec_bytecode_file.cpp @@ -267,7 +267,7 @@ TEST(tsg_lua_exec_bytecode_file, return_type_invaild) /* check */ EXPECT_EQ(ERR_RETUNR_NIL, ret); - EXPECT_EQ(5, out_len); + EXPECT_EQ(0, out_len); EXPECT_EQ(NIL, out_type); EXPECT_STREQ("", out); } diff --git a/gtest/gtest_tsg_lua_exec_file.cpp b/gtest/gtest_tsg_lua_exec_file.cpp index 041b58d..31ff6d4 100644 --- a/gtest/gtest_tsg_lua_exec_file.cpp +++ b/gtest/gtest_tsg_lua_exec_file.cpp @@ -439,7 +439,7 @@ TEST(tsg_lua_exec_file, return_type_nil) /* check */ EXPECT_EQ(ERR_RETUNR_NIL, ret); - EXPECT_EQ(5, out_len); + EXPECT_EQ(0, out_len); EXPECT_EQ(NIL, out_type); EXPECT_STREQ("", out); } diff --git a/src/tsg_lua_func.cpp b/src/tsg_lua_func.cpp index 4a95ab1..61ec5f8 100644 --- a/src/tsg_lua_func.cpp +++ b/src/tsg_lua_func.cpp @@ -705,6 +705,7 @@ int tsg_lua_exec_file(tsg_lua_handle lua, const char *script, const char *in, si debuginfo("script return nil", __FILE__, __LINE__); actual_out_type = NIL; *out_type = NIL; + *out_len = 0; return_value = ERR_RETUNR_NIL; break; case LUA_TSTRING: |
