If the input file ends without a space or newline, don't ignore the last word
(Closes #4)
This commit is contained in:
parent
eb5742e70b
commit
3f067bd7a6
|
|
@ -528,9 +528,15 @@ cw.encoding = UTF8;
|
|||
|
||||
|
||||
} /* word */
|
||||
|
||||
} /* eof */
|
||||
|
||||
/* If the file ends without newline or space, but directly with EOF after
|
||||
* the last word, this one is lost, so we need to add it... */
|
||||
if (strlen(word) && word[0] != '|' && word[0] != '#') {
|
||||
makeword(mapstring(word, &cw), &cw);
|
||||
chw++;
|
||||
}
|
||||
|
||||
/* CGI: Add some silence (500ms) to the end of the file */
|
||||
#ifdef CGI
|
||||
add_silence(500, &cw);
|
||||
|
|
|
|||
Loading…
Reference in New Issue