From 27217f9a740d690b2c36644c5e7d297604c03231 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 13 Sep 2006 22:55:55 +0000 Subject: Fixed Fl_RGB_Image::copy. My previous fix had the meaning of ld() wrong. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5427 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Image.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index 0b844255c..60e56078a 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -156,13 +156,13 @@ Fl_Image *Fl_RGB_Image::copy(int W, int H) { if (array) { // Make a copy of the image data and return a new Fl_RGB_Image... new_array = new uchar[w() * h() * d()]; - if (ld()) { + if (ld() && ld()!=w()*d()) { const uchar *src = array; uchar *dst = new_array; - int dy, dh = h(), wd = w()*d(), wdld = wd+ld(); + int dy, dh = h(), wd = w()*d(), wld = ld(); for (dy=0; dy