[code] error in string parsing

From: Raven Jade Kenago (raventhorne@YAHOO.COM)
Date: 04/08/98


I'm trying to parse through this code, (it is for practicing), it
takes the argument the person types and copies it to another buf while
looking for the number
of practices they specified to use. If the remaining argument has no
number, the number is one, otherwise it (later) tries to atoi the
argument and get the number.
It then takes the tempbuf value and tries to find a matching
skill/spell.

However, it gets odd errors, especially on two word spells.. it gets
garbage characters in there and
I have absolutely no idea why. Any help? Snippet following that's
causing the problem


  *tempbuf = '\0';

  while (*argument && !isdigit(*argument)) {
    tempbuf[x] = *argument;
    x++;
    argument++;
  }



Raven
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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