Treat ^end<EOF> as valid terminator (like ^end\n), some encoders (f.e. Eudora)

produce such things.
This commit is contained in:
Andrey A. Chernov 1996-04-25 14:49:40 +00:00
parent ab112e9f34
commit cc8c038449

View File

@ -172,7 +172,7 @@ decode()
}
}
}
if (!fgets(buf, sizeof(buf), stdin) || strcmp(buf, "end\n")) {
if (!fgets(buf, sizeof(buf), stdin) || strcmp(buf, "end") || (buf[3] && buf[3] != '\n')) {
(void)fprintf(stderr, "uudecode: %s: no \"end\" line.\n",
filename);
return(1);