diff options
author | rubidium <rubidium@openttd.org> | 2007-01-10 18:56:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-01-10 18:56:51 +0000 |
commit | f35ed4bbc2b05f1b83476b60948d64375f77f1b4 (patch) | |
tree | 1a1c59c13ddb1d152052f3a3a0bcffe4fb531173 /src/screenshot.cpp | |
parent | a332d10fd938f345fff18e5f4a662a58f692f734 (diff) | |
download | openttd-f35ed4bbc2b05f1b83476b60948d64375f77f1b4.tar.xz |
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
Diffstat (limited to 'src/screenshot.cpp')
-rw-r--r-- | src/screenshot.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 5a73fa52a..f66745540 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -13,6 +13,7 @@ #include "screenshot.h" #include "variables.h" #include "date.h" +#include "helpers.hpp" char _screenshot_format_name[8]; uint _num_screenshot_formats; @@ -118,7 +119,7 @@ static bool MakeBmpImage(const char *name, ScreenshotCallback *callb, void *user maxlines = clamp(65536 / padw, 16, 128); // now generate the bitmap bits - buff = malloc(padw * maxlines); // by default generate 128 lines at a time. + MallocT(&buff, padw * maxlines); // by default generate 128 lines at a time. if (buff == NULL) { fclose(f); return false; @@ -225,7 +226,7 @@ static bool MakePNGImage(const char *name, ScreenshotCallback *callb, void *user maxlines = clamp(65536 / w, 16, 128); // now generate the bitmap bits - buff = malloc(w * maxlines); // by default generate 128 lines at a time. + MallocT(&buff, w * maxlines); // by default generate 128 lines at a time. if (buff == NULL) { png_destroy_write_struct(&png_ptr, &info_ptr); fclose(f); @@ -322,7 +323,7 @@ static bool MakePCXImage(const char *name, ScreenshotCallback *callb, void *user maxlines = clamp(65536 / w, 16, 128); // now generate the bitmap bits - buff = malloc(w * maxlines); // by default generate 128 lines at a time. + MallocT(&buff, w * maxlines); // by default generate 128 lines at a time. if (buff == NULL) { fclose(f); return false; |