diff options
Diffstat (limited to 'src/qml/jsruntime/qv4value_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4value_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h index b89011a9a0..97c6ea23ff 100644 --- a/src/qml/jsruntime/qv4value_p.h +++ b/src/qml/jsruntime/qv4value_p.h @@ -824,7 +824,7 @@ inline unsigned int Value::toUInt32() const inline qint64 Value::toLength() const { if (Q_LIKELY(integerCompatible())) - return int_32(); + return int_32() < 0 ? 0 : int_32(); double i = Primitive::toInteger(isDouble() ? doubleValue() : toNumberImpl()); if (i <= 0) return 0; |