[libgxps] gxps-page: Use gxps_value_get_double_non_negative to parse dash array values



commit a69f9be76536d1ffc28dd548f4db228e2d382174
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Tue Nov 26 10:50:27 2013 +0100

    gxps-page: Use gxps_value_get_double_non_negative to parse dash array values
    
    Dash array values can't be negative. Spotted by Lukas Lueg.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=715023

 libgxps/gxps-page.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libgxps/gxps-page.c b/libgxps/gxps-page.c
index 85035b5..66c6228 100644
--- a/libgxps/gxps-page.c
+++ b/libgxps/gxps-page.c
@@ -226,7 +226,7 @@ gxps_dash_array_parse (const gchar *dash,
 
        dashes = g_malloc (num_dashes * sizeof (gdouble));
        for (i = 0; i < num_dashes; i++) {
-                if (!gxps_value_get_double (items[i], &dashes[i])) {
+                if (!gxps_value_get_double_non_negative (items[i], &dashes[i])) {
                         g_free (dashes);
                         g_strfreev (items);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]