From eff931b464169b87f26a9f3f6217aeb2a46d16d0 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Mon, 5 Jul 2010 14:59:22 +0200 Subject: [PATCH] fixed broken getdistance function --- components/interpreter/spatialopcodes.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/interpreter/spatialopcodes.hpp b/components/interpreter/spatialopcodes.hpp index 7e2430852..2a401ae8a 100644 --- a/components/interpreter/spatialopcodes.hpp +++ b/components/interpreter/spatialopcodes.hpp @@ -13,7 +13,10 @@ namespace Interpreter virtual void execute (Runtime& runtime) { std::string name = runtime.getStringLiteral (runtime[0]); - runtime[0] = runtime.getContext().getDistance (name); + + float distance = runtime.getContext().getDistance (name); + + runtime[0] = *reinterpret_cast (&distance); } }; }