(%c): In no-assign case, fix loop to decrement WIDTH before test.
authorroland <roland>
Thu, 2 Mar 1995 17:15:13 +0000 (17:15 +0000)
committerroland <roland>
Thu, 2 Mar 1995 17:15:13 +0000 (17:15 +0000)
stdio/vfscanf.c

index 681e898..10baa94 100644 (file)
@@ -231,8 +231,7 @@ DEFUN(__vfscanf, (s, format, arg),
              while (inchar() != EOF && --width > 0);
            }
          else
-           while (inchar() != EOF && width > 0)
-             --width;
+           while (inchar() != EOF && --width > 0);
 
          if (do_assign)
            ++done;