mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-25 10:11:10 +01:00
This avoids assuming that the pixels are suitably aligned for direct access, which there's no guarantee that they are; in particular, 3-bytes-per-pixel RGB images are likely to have 3 out of 4 pixels misaligned. On x86, dereferencing a misaligned pointer does what you would expect, but on other architectures it's undefined whether it will work, crash with SIGBUS, or silently give a wrong answer. Signed-off-by: Simon McVittie <smcv@collabora.com>
12 KiB
12 KiB