Revision: 75770
          http://sourceforge.net/p/brlcad/code/75770
Author:   starseeker
Date:     2020-05-12 17:05:27 +0000 (Tue, 12 May 2020)
Log Message:
-----------
fix chull subcommand arg checks

Modified Paths:
--------------
    brlcad/trunk/src/libged/bot/bot.cpp

Modified: brlcad/trunk/src/libged/bot/bot.cpp
===================================================================
--- brlcad/trunk/src/libged/bot/bot.cpp 2020-05-12 15:30:31 UTC (rev 75769)
+++ brlcad/trunk/src/libged/bot/bot.cpp 2020-05-12 17:05:27 UTC (rev 75770)
@@ -152,8 +152,16 @@
        return GED_OK;
     }
 
+    argc--; argv++;
+
     struct _ged_bot_info *gb = (struct _ged_bot_info *)bs;
+   
+    if (!argc) {
+       bu_vls_printf(gb->gedp->ged_result_str, "%s\n%s\n", usage_string, 
purpose_string);
+       return GED_ERROR;
+    }
 
+
     if (_bot_obj_setup(gb, argv[0]) == GED_ERROR) {
        return GED_ERROR;
     }
@@ -166,12 +174,6 @@
     int *faces;
     unsigned char err = 0;
 
-    /* must be wanting help */
-    if (argc < 2) {
-       bu_vls_printf(gb->gedp->ged_result_str, "%s\n%s\n", usage_string, 
purpose_string);
-       return GED_ERROR;
-    }
-
     retval = bg_3d_chull(&faces, &fc, &vert_array, &vc, (const point_t 
*)bot->vertices, (int)bot->num_vertices);
 
     if (retval != 3) {
@@ -185,7 +187,7 @@
         bu_vls_sprintf(&out_name, "%s.hull", gb->dp->d_namep);
     }
 
-    if (db_lookup(gb->gedp->ged_wdbp->dbip, bu_vls_cstr(&out_name), 
LOOKUP_NOISY) != RT_DIR_NULL) {
+    if (db_lookup(gb->gedp->ged_wdbp->dbip, bu_vls_cstr(&out_name), 
LOOKUP_QUIET) != RT_DIR_NULL) {
         bu_vls_printf(gb->gedp->ged_result_str, "Object %s already exists!\n", 
bu_vls_cstr(&out_name));
         bu_vls_free(&out_name);
         return GED_ERROR;

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



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to