enum index_summary_type type, int highlight) {
#if 1 // Nick, do this first
/* remove superfluous whitespace from the end of the sentence */
- while (sent->buf[sent->buflen - 1] == ' ') {
+ while (sent->buflen && sent->buf[sent->buflen - 1] == ' ') {
sent->buflen--;
}
#endif
}
/* remove superfluous whitespace from the end of the sentence */
- while (sent->buf[sent->buflen - 1] == ' ') {
+ while (sent->buflen && sent->buf[sent->buflen - 1] == ' ') {
sent->buflen--;
}
#endif