default strtok behaviour

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
what would be the default strtok behaviour when a null string is passed
into the string parameter in the first call to strtok?
I would expect a null pointer to be returned but it is sometimes causing my
program to crash.
Thanks.
 
sven said:
Hi,
what would be the default strtok behaviour when a null string is passed
into the string parameter in the first call to strtok?
I would expect a null pointer to be returned but it is sometimes causing
my
program to crash.

By "null string", do you mean null pointer, or empty (zero-length
NUL-terminated) string?
 
Sorry for the ambuguity. I mean the null pointer.
This null pointer is returned from a failed previous api call but it does
not cause the app to crash everytime it reaches strtok.
 
Back
Top