Hi.
This small patch replaces malloc() with new []. I'm running the
current CVS code with this patch in, and so far there hasn't been
any catastrophic failures.
Art Haas
Index: lib/Image.cc
===================================================================
RCS file: /cvsroot/blackboxwm/blackbox/lib/Image.cc,v
retrieving revision 1.45
diff -u -r1.45 Image.cc
--- lib/Image.cc 9 Mar 2004 08:34:03 -0000 1.45
+++ lib/Image.cc 9 Mar 2004 23:49:24 -0000
@@ -491,7 +491,7 @@
bt::Image::~Image(void) {
- free(data);
+ delete [] data;
data = 0;
}
@@ -516,7 +516,7 @@
to = texture.colorTo();
}
- data = static_cast<RGB *>(malloc(width * height * sizeof(RGB)));
+ data = new RGB[width * height * sizeof(RGB)];
if (texture.texture() & bt::Texture::Diagonal)
dgradient(from, to, interlaced);
--
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.
-Thomas Jefferson to James Smith, 1822
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
List archives: http://asgardsrealm.net/lurker/splash/index.html
Trouble? Contact [EMAIL PROTECTED]