Michiel Brandenburg wrote: - while(*s) { + while(s && *s) { if (*s == '\n') *s = ' '; + s++; Aiiee, that's embarrassing!!! Thanks for the fix. Regards, David.