(getele): Zero-terminate empty telegrams. Returned telegram was

broken in rev. 1.9.  ~p never worked.
This commit is contained in:
Markus Armbruster 2006-03-25 20:11:55 +00:00
parent 5122f25f6c
commit beae3ea770

View file

@ -57,6 +57,7 @@ getele(char *recipient, char *buf)
pr("Enter telegram for %s\n", recipient);
pr("undo last line with ~u, print with ~p, abort with ~q, end with ^D or .\n");
bp = buf;
*bp = 0;
while (!player->aborted) {
sprintf(left, "%4d left: ", (int)(buf + MAXTELSIZE - bp));
if (uprmptrd(left, buffer, sizeof(buffer) - 2) <= 0)