From: Jasper van de Gronde
Date: Wed, 4 Aug 2010 06:59:03 +0000 (+0200)
Subject: Fix for subtle bug in parsing export area, found by Vaughn Spurlin using Coverity
X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a633a3ef3de605ad960373ce28dc7916750bd4d8;p=inkscape.git
Fix for subtle bug in parsing export area, found by Vaughn Spurlin using Coverity
---
diff --git a/src/main.cpp b/src/main.cpp
index 9f7bc9ad3..78b66d847 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1345,7 +1345,7 @@ sp_do_export_png(SPDocument *doc)
if (sp_export_area) {
/* Try to parse area (given in SVG pixels) */
gdouble x0,y0,x1,y1;
- if (!sscanf(sp_export_area, "%lg:%lg:%lg:%lg", &x0, &y0, &x1, &y1) == 4) {
+ if (sscanf(sp_export_area, "%lg:%lg:%lg:%lg", &x0, &y0, &x1, &y1) != 4) {
g_warning("Cannot parse export area '%s'; use 'x0:y0:x1:y1'. Nothing exported.", sp_export_area);
return;
}