]> mj.ucw.cz Git - nwho.git/commitdiff
Fixed a buglet.
authorMartin Mares <mj@ucw.cz>
Tue, 30 Sep 1997 14:53:14 +0000 (14:53 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 30 Sep 1997 14:53:14 +0000 (14:53 +0000)
ChangeLog
nwho.c

index 524abb0d637a39ba2a7581a779a856f9b12432ce..9a3e5a8f4d25401b18b594ae2a88d24ffda111f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Sep 30 16:52:44 1997  Martin Mares  <mj@lomikel.karlin.mff.cuni.cz>
+
+       * nwho.c (scan): <= instead of < was causing invalid messages
+       about invalid records.
+
 Fri Sep 26 23:45:57 1997  Martin Mares  <mj@albireo.mj.gts.cz>
 
        * Added nwhod, nwho and nuptime. Released as version 1.8.
diff --git a/nwho.c b/nwho.c
index f9e16393a0b9ec5a5d45acf9c6eb6bc5dcf82fb3..c0737f502c4741648e28ed12567252dea424061d 100644 (file)
--- a/nwho.c
+++ b/nwho.c
@@ -112,7 +112,7 @@ scan(void)
          }
        r = read(fd, &pkt, sizeof(pkt));
        close(fd);
-       if (r <= sizeof(struct rywho_pkt) - MAX_USERS*sizeof(struct userinfo)
+       if (r < sizeof(struct rywho_pkt) - MAX_USERS*sizeof(struct userinfo)
            || r != sizeof(struct rywho_pkt) - (MAX_USERS - ntohl(pkt.num_users))*sizeof(struct userinfo))
          {
            fprintf(stderr, "%s: Malformed record\n", e->d_name);