diff --git a/src/Hassium/Interpreter/Interpreter.cs b/src/Hassium/Interpreter/Interpreter.cs index 2b5a94e..5734f87 100644 --- a/src/Hassium/Interpreter/Interpreter.cs +++ b/src/Hassium/Interpreter/Interpreter.cs @@ -921,10 +921,10 @@ public object Accept(MentalNode node) switch (mnode.OpType) { case "++": - SetVariable(mnode.Name, Convert.ToDouble((object)GetVariable(mnode.Name, mnode)) + 1, mnode); + SetVariable(mnode.Name, Convert.ToInt32((object)GetVariable(mnode.Name, mnode)) + 1, mnode); break; case "--": - SetVariable(mnode.Name, Convert.ToDouble((object)GetVariable(mnode.Name, mnode)) - 1, mnode); + SetVariable(mnode.Name, Convert.ToInt32((object)GetVariable(mnode.Name, mnode)) - 1, mnode); break; default: throw new ParseException("Unknown operation " + mnode.OpType, mnode);