From 1ae22e98231368e5e8bcbb1d6e74fa59a9d17944 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 23 Sep 2009 13:32:15 +1000 Subject: Off by one bug in binding bit test --- src/declarative/qml/qmlengine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 0efb5c8..a58b35e 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -730,7 +730,7 @@ void QmlDeclarativeData::destroyed(QObject *object) bool QmlDeclarativeData::hasBindingBit(int bit) const { - if (bindingBitsSize >= bit) + if (bindingBitsSize > bit) return bindingBits[bit / 32] & (1 << (bit % 32)); else return false; @@ -738,13 +738,13 @@ bool QmlDeclarativeData::hasBindingBit(int bit) const void QmlDeclarativeData::clearBindingBit(int bit) { - if (bindingBitsSize >= bit) + if (bindingBitsSize > bit) bindingBits[bit / 32] &= ~(1 << (bit % 32)); } void QmlDeclarativeData::setBindingBit(QObject *obj, int bit) { - if (bindingBitsSize < bit) { + if (bindingBitsSize <= bit) { int props = obj->metaObject()->propertyCount(); Q_ASSERT(bit < props); -- cgit v0.12