strpbrk muss mit _ aufgerufen - alles andere fuehrt zu einem segfault

bei der Verwendung von strtok()
This commit is contained in:
Oliver Lehmann 2009-07-29 06:58:48 +00:00
parent 5900871abf
commit cac63efe2f
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@
* if(*p == '\0') // return if no tokens remaining
* return(NULL);
*
* if((r = strpbrk(q, sepset)) != NULL) // move past token
* if((r = strpbrk(p, sepset)) != NULL) // move past token
* {
* *r = '\0';
* r++;
@ -74,7 +74,7 @@ _strtok::
jr ~finis
~L2:
ldl @SP,rr8
call ~strpbrk // rr2 <-> r=strpbrk(p,sepset)
call _strpbrk // rr2 <-> r=strpbrk(p,sepset)
testl rr2
jr z,~L3
clrb @rr2