From 77484a4e2d9d3e8ab82855b2b3baf0bbe7e81ba5 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 26 Oct 2005 09:08:01 +0000 Subject: FLUID writes RGB and Bitmap image data as an array of decimal numbers instead of a string since "a certain compiler by a large operating system vendor which shall remain unnamed" can not handle long strings and produces heap overflows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4607 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/Fluid_Image.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fluid/Fluid_Image.cxx') diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx index 8ceaae003..fba6a9f9c 100644 --- a/fluid/Fluid_Image.cxx +++ b/fluid/Fluid_Image.cxx @@ -94,7 +94,7 @@ void Fluid_Image::write_static() { } write_c("static unsigned char %s[] =\n", unique_id(this, "idata", fl_filename_name(name()), 0)); - write_cstring(img->data()[0], ((img->w() + 7) / 8) * img->h()); + write_cdata(img->data()[0], ((img->w() + 7) / 8) * img->h()); write_c(";\n"); write_c("static Fl_Bitmap %s(%s, %d, %d);\n", unique_id(this, "image", fl_filename_name(name()), 0), @@ -109,7 +109,7 @@ void Fluid_Image::write_static() { } write_c("static unsigned char %s[] =\n", unique_id(this, "idata", fl_filename_name(name()), 0)); - write_cstring(img->data()[0], (img->w() * img->d() + img->ld()) * img->h()); + write_cdata(img->data()[0], (img->w() * img->d() + img->ld()) * img->h()); write_c(";\n"); write_c("static Fl_RGB_Image %s(%s, %d, %d, %d, %d);\n", unique_id(this, "image", fl_filename_name(name()), 0), -- cgit v1.2.3