summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Wey2011-11-05 04:59:07 -0700
committerMike Wey2011-11-05 04:59:07 -0700
commit344ea66f0bcac5b20a0e824fbf105c9473efc7b3 (patch)
treea809c96d98d19b5cdecdfdde20194b48400ddf2c
parent4841afcb9613f1d01e764f1b96cc076add5b3180 (diff)
parent0c11cca372f96f0b614ca3bd99b832aa8235f0e4 (diff)
Merge pull request #2 from AndrejMitrovic/fixformatlength
Fix std.string.format hijack and the wrong comparison for buffer length.
-rw-r--r--dmagick/Image.d4
1 files 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);