diff options
Diffstat (limited to 'src/screenshot.cpp')
-rw-r--r-- | src/screenshot.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp index c2903699b..9cbaad628 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -449,7 +449,7 @@ void SetScreenshotFormat(int i) static void CurrentScreenCallback(void *userdata, Pixel *buf, uint y, uint pitch, uint n) { for (; n > 0; --n) { - memcpy(buf, _screen.dst_ptr + y * _screen.pitch, _screen.width); + memcpy(buf, _screen.dst_ptr + y * _screen.pitch, _screen.width * sizeof(Pixel)); ++y; buf += pitch; } |