mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
purge past-the-stack access in protected function result
This commit is contained in:
parent
cbd79234d8
commit
f5764337cb
|
@ -20,8 +20,8 @@
|
||||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// This file was generated with a script.
|
// This file was generated with a script.
|
||||||
// Generated 2018-01-20 18:42:23.650677 UTC
|
// Generated 2018-01-20 19:31:24.245892 UTC
|
||||||
// This header was generated with sol v2.19.0 (revision 0afd822)
|
// This header was generated with sol v2.19.0 (revision cbd7923)
|
||||||
// https://github.com/ThePhD/sol2
|
// https://github.com/ThePhD/sol2
|
||||||
|
|
||||||
#ifndef SOL_SINGLE_INCLUDE_HPP
|
#ifndef SOL_SINGLE_INCLUDE_HPP
|
||||||
|
@ -6072,6 +6072,9 @@ namespace sol {
|
||||||
if (count < 1)
|
if (count < 1)
|
||||||
return;
|
return;
|
||||||
int top = lua_gettop(L);
|
int top = lua_gettop(L);
|
||||||
|
if (top < 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (rawindex == -count || top == rawindex) {
|
if (rawindex == -count || top == rawindex) {
|
||||||
// Slice them right off the top
|
// Slice them right off the top
|
||||||
lua_pop(L, static_cast<int>(count));
|
lua_pop(L, static_cast<int>(count));
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// This file was generated with a script.
|
// This file was generated with a script.
|
||||||
// Generated 2018-01-20 18:42:23.882794 UTC
|
// Generated 2018-01-20 19:31:24.431906 UTC
|
||||||
// This header was generated with sol v2.19.0 (revision 0afd822)
|
// This header was generated with sol v2.19.0 (revision cbd7923)
|
||||||
// https://github.com/ThePhD/sol2
|
// https://github.com/ThePhD/sol2
|
||||||
|
|
||||||
#ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP
|
#ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP
|
||||||
|
|
|
@ -40,6 +40,9 @@ namespace sol {
|
||||||
if (count < 1)
|
if (count < 1)
|
||||||
return;
|
return;
|
||||||
int top = lua_gettop(L);
|
int top = lua_gettop(L);
|
||||||
|
if (top < 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (rawindex == -count || top == rawindex) {
|
if (rawindex == -count || top == rawindex) {
|
||||||
// Slice them right off the top
|
// Slice them right off the top
|
||||||
lua_pop(L, static_cast<int>(count));
|
lua_pop(L, static_cast<int>(count));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user