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

Re: xscorch 0.1.16 crash


On Sat, 14 Feb 2004, Gunnar wrote:
> xscorch: seconomy-gtk.c:107: _sc_economy_init_names_gtk: Assertion
> `strnlenn(setup->ec->scoringname, 30) > 0' failed.
> Aborted

Thanks for the bug report!  The assertion is excessive; the following
patch removes it and should fix this bug.  :)


Index: seconomy-gtk.c
===================================================================
RCS file: /fridge/cvs/xscorch/sgtk/seconomy-gtk.c,v
retrieving revision 1.12
diff -u -r1.12 seconomy-gtk.c
--- seconomy-gtk.c	26 Feb 2003 01:42:54 -0000	1.12
+++ seconomy-gtk.c	16 Feb 2004 18:24:37 -0000
@@ -103,10 +103,10 @@
    info = sc_registry_find_first(setup->ec->registry, setup->ec->registryclass,
                                  SC_REGISTRY_FORWARD, SC_REGISTRY_TEST_NULL, 0);

-   /* We expect a few things, after all... */
-   assert(strnlenn(setup->ec->scoringname, SC_ECONOMY_MAX_NAME_LEN) > 0);
+   /* There must exist at least one economy scoring! */
    assert(info != NULL);

+   /* Try to find the currently selected scoring so we can hilight it. */
    target = sc_scoring_lookup_by_name(setup->ec, setup->ec->scoringname);
    if(target == NULL) target = info;


-Jacob

-- 

No.  That's where you're wrong.  This is reality.  It is a self-
sustaining ecosociosystem powered by inter-universe warp generators.

 - Fred Fine, ``The Big U'' by Neal Stephenson


Notices