Change-Id: I1786b6222867c8780f6768e5220e7ddff952b28e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
case QJsonValue::String: {
char *d = data(b);
if (latinOrIntValue)
case QJsonValue::String: {
char *d = data(b);
if (latinOrIntValue)
- s = sizeof(ushort) + *(ushort *)d;
+ s = sizeof(ushort) + qFromLittleEndian(*(ushort *)d);
- s = sizeof(int) + sizeof(ushort)*(*(int *)d);
+ s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d);
break;
}
case QJsonValue::Array:
break;
}
case QJsonValue::Array:
int size() const {
int s = sizeof(Entry);
if (value.latinKey)
int size() const {
int s = sizeof(Entry);
if (value.latinKey)
- s += sizeof(ushort) + *(ushort *) ((const char *)this + sizeof(Entry));
+ s += sizeof(ushort) + qFromLittleEndian(*(ushort *) ((const char *)this + sizeof(Entry)));
- s += sizeof(uint) + *(int *) ((const char *)this + sizeof(Entry));
+ s += sizeof(uint) + qFromLittleEndian(*(int *) ((const char *)this + sizeof(Entry)));