$Log$
+Revision 525.2 2004/12/01 16:48:24 ajc
+* tools.c: don't crash when striplt() is called with a zero-length string
+
Revision 525.1 2004/11/12 18:02:36 ajc
* Updated the richtext editor (new version from Kevin Roth's site)
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
*/
void striplt(char *buf)
{
+ if (strlen(buf) == 0) return;
while ((strlen(buf) > 0) && (isspace(buf[0])))
strcpy(buf, &buf[1]);
+ if (strlen(buf) == 0) return;
while (isspace(buf[strlen(buf) - 1]))
buf[strlen(buf) - 1] = 0;
}