diff options
Diffstat (limited to 'plugingui')
-rw-r--r-- | plugingui/image.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugingui/image.cc b/plugingui/image.cc index 22d1aca..3770fae 100644 --- a/plugingui/image.cc +++ b/plugingui/image.cc @@ -86,10 +86,16 @@ void Image::setError() std::uint32_t iw, ih; - std::memcpy(&iw, ptr, sizeof(uint32_t)); + iw = (uint32_t) ptr[0] | + (uint32_t) ptr[1] << 8 | + (uint32_t) ptr[2] << 16 | + (uint32_t) ptr[3] << 24; ptr += sizeof(uint32_t); - std::memcpy(&ih, ptr, sizeof(uint32_t)); + ih = (uint32_t) ptr[0] | + (uint32_t) ptr[1] << 8 | + (uint32_t) ptr[2] << 16 | + (uint32_t) ptr[3] << 24; ptr += sizeof(uint32_t); _width = iw; |