diff --git a/user/usertests.c b/user/usertests.c
index 0f276b4..1beeb77 100644
--- a/user/usertests.c
+++ b/user/usertests.c
@@ -609,7 +609,7 @@ writebig(char *s)
   for(;;){
     i = read(fd, buf, BSIZE);
     if(i == 0){
-      if(n == MAXFILE - 1){
+      if(n != MAXFILE){
         printf("%s: read only %d blocks from big", s, n);
         exit(1);
       }