From: Denis Dzyubenko Date: Wed, 8 Feb 2012 22:01:05 +0000 (+0100) Subject: Fixed alignment check in QJsonDocument::fromRawData X-Git-Tag: qt-v5.0.0-alpha1~1154 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9633459274f99487360bcc7c7e7c593c4ac98ce2;p=profile%2Fivi%2Fqtbase.git Fixed alignment check in QJsonDocument::fromRawData Change-Id: I1d107e26a77e40f91ff09d43e9529b08da8f7c3b Reviewed-by: Lars Knoll --- diff --git a/src/corelib/json/qjsondocument.cpp b/src/corelib/json/qjsondocument.cpp index 98a0b8c..5ae1bcb 100644 --- a/src/corelib/json/qjsondocument.cpp +++ b/src/corelib/json/qjsondocument.cpp @@ -179,8 +179,8 @@ QJsonDocument &QJsonDocument::operator =(const QJsonDocument &other) */ QJsonDocument QJsonDocument::fromRawData(const char *data, int size, DataValidation validation) { - if (!(((quintptr)validation) & ~3)) { - qWarning() <<"QJsonDocumnt::fromRawData: data has to have 4 byte alignment"; + if (quintptr(data) & 3) { + qWarning() <<"QJsonDocument::fromRawData: data has to have 4 byte alignment"; return QJsonDocument(); }