diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-09-23 03:32:15 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-09-23 03:32:15 (GMT) |
commit | 1ae22e98231368e5e8bcbb1d6e74fa59a9d17944 (patch) | |
tree | bc15069c1c872cef1da8ee47c6c64bd912850215 | |
parent | babddd243002ecd6db23aca6322fd27797bd2385 (diff) | |
download | Qt-1ae22e98231368e5e8bcbb1d6e74fa59a9d17944.zip Qt-1ae22e98231368e5e8bcbb1d6e74fa59a9d17944.tar.gz Qt-1ae22e98231368e5e8bcbb1d6e74fa59a9d17944.tar.bz2 |
Off by one bug in binding bit test
-rw-r--r-- | src/declarative/qml/qmlengine.cpp | 6 |
1 files 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); |