Added LUA_MULTRET

This commit is contained in:
Alexey Gulev 2019-09-26 10:38:42 +02:00
parent 43cd7d6518
commit af38c606dc

View File

@ -347,7 +347,7 @@ static void HandleProductResult(const Command* cmd)
IAP_PushError(L, "failed to fetch product", REASON_UNSPECIFIED); IAP_PushError(L, "failed to fetch product", REASON_UNSPECIFIED);
} }
int ret = lua_pcall(L, 3, 0, 0); int ret = lua_pcall(L, 3, LUA_MULTRET, 0);
if (ret != 0) { if (ret != 0) {
dmLogError("Error running callback: %s", lua_tostring(L, -1)); dmLogError("Error running callback: %s", lua_tostring(L, -1));
lua_pop(L, 1); lua_pop(L, 1);
@ -420,7 +420,7 @@ static void HandlePurchaseResult(const Command* cmd)
IAP_PushError(L, "failed to buy product", REASON_UNSPECIFIED); IAP_PushError(L, "failed to buy product", REASON_UNSPECIFIED);
} }
int ret = lua_pcall(L, 3, 0, 0); int ret = lua_pcall(L, 3, LUA_MULTRET, 0);
if (ret != 0) { if (ret != 0) {
dmLogError("Error running callback: %s", lua_tostring(L, -1)); dmLogError("Error running callback: %s", lua_tostring(L, -1));
lua_pop(L, 1); lua_pop(L, 1);