[dia] [scan-build] Assigned value is garbage or undefined



commit 292de4bc354894172e61eab94c8e651292e66837
Author: Hans Breuer <hans breuer org>
Date:   Sun Aug 18 10:35:16 2013 +0200

    [scan-build] Assigned value is garbage or undefined
    
    Avoid using an undefined cy offset for broken rotate(a,x) transform.

 lib/dia_svg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/lib/dia_svg.c b/lib/dia_svg.c
index 941d29f..13fcad7 100644
--- a/lib/dia_svg.c
+++ b/lib/dia_svg.c
@@ -1423,6 +1423,8 @@ _parse_transform (const gchar *trans, DiaMatrix *m, real scale)
       cx = g_ascii_strtod (list[i], NULL), ++i;
       if (list[i])
         cy = g_ascii_strtod (list[i], NULL), ++i;
+      else
+        cy = 0.0; /* if offsets don't come in pairs */
       /* rotate around the given offset */
       translate.x0 = cx;
       translate.y0 = cy;


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