From c089dbb0bb39c6b94ec8d80362b92a731e056511 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 5 Sep 2014 16:44:33 -0700 Subject: [PATCH] removed signed/unsigned comparisons --- libraries/script-engine/src/TypedArrayPrototype.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/script-engine/src/TypedArrayPrototype.cpp b/libraries/script-engine/src/TypedArrayPrototype.cpp index 37274dd080..bb612b393f 100644 --- a/libraries/script-engine/src/TypedArrayPrototype.cpp +++ b/libraries/script-engine/src/TypedArrayPrototype.cpp @@ -30,11 +30,11 @@ void TypedArrayPrototype::set(QScriptValue array, qint32 offset) { engine()->evaluate("throw \"ArgumentError: negative offset\""); } quint32 length = array.property("length").toInt32(); - if (offset + length > thisObject().data().property(typedArray->_lengthName).toInt32()) { + if (offset + (qint32)length > thisObject().data().property(typedArray->_lengthName).toInt32()) { engine()->evaluate("throw \"ArgumentError: array does not fit\""); return; } - for (int i = 0; i < length; ++i) { + for (quint32 i = 0; i < length; ++i) { thisObject().setProperty(QString::number(offset + i), array.property(QString::number(i))); } } else {