mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix the 'between' operator as well as 'greater than' and 'less than' comparisons for LOBOT filters (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9159 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -230,9 +230,9 @@ bool Filter::Match(SOLDIERTYPE* pSoldier) {
|
||||
} else if (r & _TYPE_PAIR) {
|
||||
NumberPair* nl = ii->second.numberPair;
|
||||
// TODO: resolve compiler warning about usigned/signed and the comparison ops?!?
|
||||
sgn = (nl->second > cmp_val) ? -1 : (nl->first < cmp_val) ? 1 : 0;
|
||||
sgn = (nl->second < cmp_val) ? -1 : (nl->first > cmp_val) ? 1 : 0;
|
||||
} else {
|
||||
sgn = (ii->second.number > cmp_val) ? -1 : (ii->second.number < cmp_val) ? 1 : 0;
|
||||
sgn = (ii->second.number < cmp_val) ? -1 : (ii->second.number > cmp_val) ? 1 : 0;
|
||||
}
|
||||
} else if (r & _TYPE_STRING) {
|
||||
// string comparison is quite costly at the moment. should be avoided or reimplemented.
|
||||
|
||||
Reference in New Issue
Block a user