summaryrefslogtreecommitdiff
path: root/lout
diff options
context:
space:
mode:
Diffstat (limited to 'lout')
-rw-r--r--lout/misc.hh2
-rw-r--r--lout/object.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/lout/misc.hh b/lout/misc.hh
index 8cd67f78..730a47a4 100644
--- a/lout/misc.hh
+++ b/lout/misc.hh
@@ -166,7 +166,7 @@ public:
*/
inline T* getRef (int i) {
if (BOUND_CHECKING)
- assert (i >= 0 && i < this->num);
+ assert (i >= 0 && this->num - i > 0);
return array + i;
}
diff --git a/lout/object.cc b/lout/object.cc
index 7da124fa..9e36e20c 100644
--- a/lout/object.cc
+++ b/lout/object.cc
@@ -251,7 +251,7 @@ bool PairBase::equals(Object *other)
return
// Identical?
- this == other ||
+ this == other || (
(// Both first parts are NULL, ...
(first == NULL && otherPair->first == NULL) ||
// ... or both first parts are not NULL and equal
@@ -260,7 +260,7 @@ bool PairBase::equals(Object *other)
// Same with second part.
((second == NULL && otherPair->second == NULL) ||
(second != NULL && otherPair->second != NULL
- && second->equals (otherPair->second)));
+ && second->equals (otherPair->second))));
}
int PairBase::hashValue()