summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--text-utils/rev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/text-utils/rev.c b/text-utils/rev.c
index ace2cd6a6..735aaef3d 100644
--- a/text-utils/rev.c
+++ b/text-utils/rev.c
@@ -149,6 +149,9 @@ int main(int argc, char *argv[])
while (fgetws(buf, bufsiz, fp)) {
len = wcslen(buf);
+ if (len == 0)
+ continue;
+
/* This is my hack from setpwnam.c -janl */
while (buf[len-1] != '\n' && !feof(fp)) {
/* Extend input buffer if it failed getting the whole line */