Insidious little bug in perform_act

From: Angus Mezick (angus@EDGIL.CCMAIL.COMPUSERVE.COM)
Date: 07/28/98

If you only have a 1 word namelist on an item the $o and $O cases with go off
the edge of the buffer into the unknown.  Just add the &&(*i!='\0')) and the
if(*i= ... } code and you will be all set.  This is a nasty little bugger, but a
builders with a bad attitude can screwup your whole day.


 case 'o':
      CHECK_NULL(obj, OBJS(obj, to));
         CHECK_NULL(obj, OBJN(obj, to));
      else     /* skip to the second word */
!         while((*i==' ')&&(*i!='\0'))
!         while((*i!=' ')&&(*i!='\0'))
!         while((*i==' ')&&(*i!='\0'))
+         if(*i=='\0')
+            {
+            i="ERROR";
+            mudlogf(NRM,LVL_IMMORT,TRUE,
+               "Item vnum #%ld needs a two word short desc",
+               GET_OBJ_VNUM(obj));
+            }

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST