From accb19a680e303fd59ff0f6cfb3fd5568a4a91dd Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 14 Dec 2009 16:36:55 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : ca1.exe Ricompilazione Demo : [ ] Commento : Controllato stack underflow nelle moltiplicazioni git-svn-id: svn://10.65.10.50/trunk@19772 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/alex.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/alex.cpp b/include/alex.cpp index 7cdd3cf53..a31eaed05 100755 --- a/include/alex.cpp +++ b/include/alex.cpp @@ -906,8 +906,13 @@ void TAVM::execute(const TAVM_op& op) { const TVariant& v1 = _stack.pop(); TVariant& v0 = (TVariant&)_stack.peek(); - const real m = v0.as_real() * v1.as_real(); - v0.set(m); + if (v0.is_real()) + { + const real m = v0.as_real() * v1.as_real(); + v0.set(m); + } + else + log_error("Stack underflow"); } break; case avm_negate: