summaryrefslogtreecommitdiff
path: root/src/screenshot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/screenshot.cpp')
-rw-r--r--src/screenshot.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index 0fa309d11..200151b70 100644
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -90,7 +90,8 @@ static bool MakeBmpImage(char *name, ScreenshotCallback *callb, void *userdata,
if (f == NULL) return false;
/* each scanline must be aligned on a 32bit boundary */
- padw = Align(w, 4);
+ padw = w;
+ if (pixelformat == 8) padw = Align(padw, 4);
if (pixelformat == 8) pal_size = sizeof(RgbQuad) * 256;