On Tue, 8 Oct 2002, Carlton Colter wrote: > For some reason my triggers do not always load. If I do a tlist they show > up, but if I try and edit it, it gives me a brand new trigger. Known bug, fixed in pl9, here's the pl9 real_trigger: /* returns the real number of the trigger with given virtual number */ int real_trigger(int vnum) { int bot = 0, mid; int top = top_of_trigt-1; /* perform binary search on trigger-table */ for (;;) { mid = (bot + top) / 2; /* Thanks to Derek Fisk for fixing this loop */ if (bot > top) return (NOTHING); if (trig_index[mid]->vnum == vnum) return (mid); if (trig_index[mid]->vnum > vnum) top = mid - 1; else bot = mid + 1; } } The problem causing the 'unknown trigger blah' bugs is due to the fact that top_of_trigt is actually out of range. Setting top to top_of_trigt-1 seems to take care of it. Welcor -Mathew P.S. doing a search on the keyword trigger in the archive and looking just one week back would have given you this answer. -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT