Premysl Hruby wrote:
patch attached.
"return (char *)1;"?
cistrstr(s, sub) is supposed to return a pointer to the first
occurence of "sub" in "s", or NULL if there is none; not some fixed
pointer to memory that's probably not even allocated to the process.
Greetings, Sander.
Yes, that's true, but return value is only used only in comparison if is
or isn't null, to signalize that substring is or isn't contained in the
string.
Then change the return type to bool or int or whatever and avoid the
ugly casts.
Cheers,
Marc
--
Marc Andre Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0