From 5158b1c337ffda2bc7431f774ac10b307800adbb Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 21 Jan 2017 11:40:22 +0200 Subject: [PATCH] Fixed undefined behavior of DropInventory() See https://mantis.zdoom.org/view.php?id=93 --- src/p_mobj.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 0cdd197a8..210c0cd5b 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -1041,7 +1041,7 @@ AInventory *AActor::DropInventory (AInventory *item) AInventory *drop = nullptr; IFVIRTUALPTR(item, AInventory, CreateTossable) { - VMValue params[1] = { (DObject*)this }; + VMValue params[1] = { (DObject*)item }; VMReturn ret((void**)&drop); GlobalVMStack.Call(func, params, 1, &ret, 1, nullptr); }