ide/debugger/watches: Fixed reparsing of negative values
authorJerome St-Louis <jerome@ecere.com>
Thu, 22 May 2014 14:22:04 +0000 (10:22 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 22 May 2014 14:22:04 +0000 (10:22 -0400)
- They were being parsed as an opExp and losing Type and constant status

ide/src/debugger/debugTools.ec

index 13ceeb3..a977781 100644 (file)
@@ -324,6 +324,13 @@ void DebugComputeExpression(Expression exp)
                   {
                      expNew.expType = expNew.destType;
                      expNew.destType.refCount++;
+                     // For negative values parsed as opExp
+                     if(expNew.type == opExp && expNew.op.op == '-' && !expNew.op.exp1 && expNew.op.exp2)
+                     {
+                        expNew.op.exp2.expType = expNew.destType;
+                        expNew.destType.refCount++;
+                        expNew.op.exp2.isConstant = true;
+                     }
                   }
                   else
                      ProcessExpressionType(expNew);