if ((ch == 10) || (ch == 13)) {
send_complete_line = 1;
} else if ((ch == 8) || (ch == 127)) {
- if (strlen(wbuf) > 0) {
+ if (!IsEmptyStr(wbuf)) {
wbuf[strlen(wbuf) - 1] = 0;
sln_printf("%c %c", 8, 8);
}
/* if it's time to word wrap, send a partial line */
if (strlen(wbuf) >= (77 - strlen(fullname))) {
pos = 0;
- for (a = 0; a < strlen(wbuf); ++a) {
+ for (a = 0; !IsEmptyStr(&wbuf[a]); ++a) {
if (wbuf[a] == 32)
pos = a;
}