From a633a3ef3de605ad960373ce28dc7916750bd4d8 Mon Sep 17 00:00:00 2001 From: Jasper van de Gronde Date: Wed, 4 Aug 2010 08:59:03 +0200 Subject: [PATCH] Fix for subtle bug in parsing export area, found by Vaughn Spurlin using Coverity --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.30.2