From 0c11cca372f96f0b614ca3bd99b832aa8235f0e4 Mon Sep 17 00:00:00 2001 From: Andrej Mitrovic Date: Sat, 5 Nov 2011 00:14:03 +0100 Subject: Fix std.string.format hijack and the wrong comparison for buffer length. --- dmagick/Image.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dmagick/Image.d b/dmagick/Image.d index 5497e40..2303676 100644 --- a/dmagick/Image.d +++ b/dmagick/Image.d @@ -1353,8 +1353,8 @@ class Image */ void exportPixels(T)(Geometry area, T[] pixels, string map = "RGBA") const { - if ( pixels.length <= (area.width * area.height) * map.count ) - throw new ImageException(format("Pixel buffer needs more storage for %s channels.", map)); + if ( pixels.length < (area.width * area.height) * map.count ) + throw new ImageException(std.string.format("Pixel buffer needs more storage for %s channels.", map)); StorageType storage = getStorageType!(T); -- cgit v1.2.3