diff options
author | Joshua Williams <joshmackwilliams@protonmail.com> | 2021-05-21 19:29:52 -0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-05-23 07:14:07 +0200 |
commit | 6cdfd89413eab85dba7b975199358cb8fae44661 (patch) | |
tree | 272b2f5d3a75b4b22fbcd6223bdfb94695e8843d /basic/source/comp | |
parent | 49af7e22e61c2e5d440ad55cd362388983e128ae (diff) |
tdf#142180 Swapped comparison operators for static strings
It seems that, for some reason, the comparison operators for
strings in basic were swapped in the code that evaluates
string comparisons at compile-time. This is what caused
bug #142180. This commit simply swaps the operators and
should fix the bug.
Change-Id: I14f90db8598f2f7f8b709e26902986e1f64af576
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115983
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic/source/comp')
-rw-r--r-- | basic/source/comp/exprnode.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx index 1771da0017f3..4192ceb8d49d 100644 --- a/basic/source/comp/exprnode.cxx +++ b/basic/source/comp/exprnode.cxx @@ -274,16 +274,16 @@ void SbiExprNode::FoldConstantsBinaryNode(SbiParser* pParser) nVal = ( eRes != 0 ) ? SbxTRUE : SbxFALSE; break; case LT: - nVal = ( eRes < 0 ) ? SbxTRUE : SbxFALSE; + nVal = ( eRes > 0 ) ? SbxTRUE : SbxFALSE; break; case GT: - nVal = ( eRes > 0 ) ? SbxTRUE : SbxFALSE; + nVal = ( eRes < 0 ) ? SbxTRUE : SbxFALSE; break; case LE: - nVal = ( eRes <= 0 ) ? SbxTRUE : SbxFALSE; + nVal = ( eRes >= 0 ) ? SbxTRUE : SbxFALSE; break; case GE: - nVal = ( eRes >= 0 ) ? SbxTRUE : SbxFALSE; + nVal = ( eRes <= 0 ) ? SbxTRUE : SbxFALSE; break; default: pParser->Error( ERRCODE_BASIC_CONVERSION ); |