Fix reading qle_signedbitfield as int

The type-cast to int for qle_signedbitfield was wrong for all cases
where width + pos != 32. The class is currently only used two places
though, both where that happen to apply.

Change-Id: I108c565b75c9f29dd49b5e2e39f84910d17ead85
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Allan Sandfeld Jensen 2017-06-15 17:40:25 +02:00 committed by J-P Nurmi
parent da8701ff57
commit f5f98da54e

View File

@ -243,7 +243,7 @@ public:
uint i = qFromLittleEndian(val);
i <<= 32 - width - pos;
int t = (int) i;
t >>= pos;
t >>= 32 - width;
return t;
}
bool operator !() const {