summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2018-10-30 07:04:52 -0700
committerGitHub <noreply@github.com>2018-10-30 07:04:52 -0700
commitd7c09701975eb1032c245f0c3a762680cbe7a255 (patch)
treef8b284685e3ccdfd3dfc6c827fef23bee68c7825 /source
parent725985528f77ba939a5cddc71e5006fee7638465 (diff)
Fix implementation of >= in preprocessor conditionals (#701)
By a copy-paste error, `>=` in a preprocessor condition was behaving as `<=`.
Diffstat (limited to 'source')
-rw-r--r--source/slang/preprocessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/preprocessor.cpp b/source/slang/preprocessor.cpp
index 0bda70891..4b1d63850 100644
--- a/source/slang/preprocessor.cpp
+++ b/source/slang/preprocessor.cpp
@@ -1320,7 +1320,7 @@ static PreprocessorExpressionValue EvaluateInfixOp(
case TokenType::OpLess: return left < right ? 1 : 0;
case TokenType::OpGreater: return left > right ? 1 : 0;
case TokenType::OpLeq: return left <= right ? 1 : 0;
- case TokenType::OpGeq: return left <= right ? 1 : 0;
+ case TokenType::OpGeq: return left >= right ? 1 : 0;
case TokenType::OpEql: return left == right ? 1 : 0;
case TokenType::OpNeq: return left != right ? 1 : 0;
case TokenType::OpBitAnd: return left & right;