diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2011-09-30 18:11:41 +0200 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2011-09-30 18:19:58 +0200 |
commit | b0252bdf02720193d1c638ec9ec32c1f4cedc6f3 (patch) | |
tree | 9646fc458249d1d5605b05b52ba3e5cbea3416a4 | |
parent | 06e95db4e63f45d5a4f5d127e4074aa611a17f66 (diff) |
COMPAREFIELDS(): fix -1 case
The compare result was only 1 or 0, never -1, because of a teriary
operator which mapped all non-null values to 1. Cut-and-paste error?
The fix passes the underlying value through unchanged. Perhaps this
will return values like -999 to the caller, in contradiction to the
definition of the macro. However, it is unclear what should be
returned in that case.
-rwxr-xr-x | src/sysync/multifielditemtype.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sysync/multifielditemtype.cpp b/src/sysync/multifielditemtype.cpp index 6f1d810..794baad 100755 --- a/src/sysync/multifielditemtype.cpp +++ b/src/sysync/multifielditemtype.cpp @@ -215,7 +215,7 @@ public: if (!mfitP->fFirstItemP) aTermP->setAsInteger(SYSYNC_NOT_COMPARABLE); else { aTermP->setAsInteger( - mfitP->fFirstItemP->standardCompareWith(*(mfitP->fSecondItemP),mfitP->fEqMode,OBJDEBUGTEST(mfitP,DBG_SCRIPTS+DBG_DATA+DBG_MATCH)) ? 1 : 0 + mfitP->fFirstItemP->standardCompareWith(*(mfitP->fSecondItemP),mfitP->fEqMode,OBJDEBUGTEST(mfitP,DBG_SCRIPTS+DBG_DATA+DBG_MATCH)) ); } }; // func_CompareFields |