mojoshader_preprocessor.c
changeset 1126 91c22d2de774
parent 1122 b333c15bb984
child 1128 a66416e507d1
--- a/mojoshader_preprocessor.c	Mon Mar 25 15:34:28 2013 -0400
+++ b/mojoshader_preprocessor.c	Tue Apr 16 00:52:22 2013 -0400
@@ -1691,12 +1691,16 @@
             isleft = 0;
         else if (token == ((Token) '-'))
         {
-            if ((isleft = (previous_token == TOKEN_INT_LITERAL)) == 0)
+            isleft = ((previous_token == TOKEN_INT_LITERAL) ||
+                      (previous_token == ((Token) ')')));
+            if (!isleft)
                 token = TOKEN_PP_UNARY_MINUS;
         } // else if
         else if (token == ((Token) '+'))
         {
-            if ((isleft = (previous_token == TOKEN_INT_LITERAL)) == 0)
+            isleft = ((previous_token == TOKEN_INT_LITERAL) ||
+                      (previous_token == ((Token) ')')));
+            if (!isleft)
                 token = TOKEN_PP_UNARY_PLUS;
         } // else if