Revision: 56592
          http://sourceforge.net/p/brlcad/code/56592
Author:   brlcad
Date:     2013-08-05 19:32:12 +0000 (Mon, 05 Aug 2013)
Log Message:
-----------
make sure the zoom string is sane so we don't propagate a zero

Modified Paths:
--------------
    brlcad/trunk/src/mged/chgview.c

Modified: brlcad/trunk/src/mged/chgview.c
===================================================================
--- brlcad/trunk/src/mged/chgview.c     2013-08-05 18:48:17 UTC (rev 56591)
+++ brlcad/trunk/src/mged/chgview.c     2013-08-05 19:32:12 UTC (rev 56592)
@@ -2677,6 +2677,8 @@
 int
 cmd_zoom(ClientData UNUSED(clientData), Tcl_Interp *interp, int argc, const 
char *argv[])
 {
+    double zval;
+
     if (argc != 2) {
        struct bu_vls vls = BU_VLS_INIT_ZERO;
 
@@ -2687,7 +2689,12 @@
        return TCL_ERROR;
     }
 
-    return mged_zoom(atof(argv[1]));
+    /* sanity check the zoom value */
+    zval = atof(argv([1]));
+    if (zval > 0.0)
+       return mged_zoom(zval);
+
+    return TCL_ERROR;
 }
 
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to