(__argp_fmtstream_update): Correct off-by-one in wordwrap algorithm
[kopensolaris-gnu/glibc.git] / argp / argp-fmtstream.c
index 05e9e21..1649f15 100644 (file)
@@ -213,10 +213,10 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
          if (nextline > buf)
            {
              /* Swallow separating blanks.  */
-             if (p > buf)
+             if (p >= buf)
                do
                  --p;
-               while (p > buf && isblank (*p));
+               while (p >= buf && isblank (*p));
              nl = p + 1;       /* The newline will replace the first blank. */
            }
          else