From 05e5c35f1e6677820b8a86ad6bb66a3e17c5ce43 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 2 Feb 2012 12:16:47 +1000 Subject: Get the right type for identifier subs. --- LuaSL/src/LuaSL_compile.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'LuaSL/src') diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index ac4d779..2d5878f 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c @@ -374,6 +374,11 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, if (var) lType = var->basicType; + if (left->value.identifierValue->sub) + { + // TODO - keep an eye on this, but I think all the sub types are floats. + lType = OT_float; + } } else lType = left->basicType; @@ -396,6 +401,11 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, if (var) rType = var->basicType; + if (right->value.identifierValue->sub) + { + // TODO - keep an eye on this, but I think all the sub types are floats. + rType = OT_float; + } } else rType = right->basicType; -- cgit v1.1