diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-12-10 21:36:56 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-12-10 21:36:56 +0000 |
commit | 96f649aa3b7ee7d6814ecce639bde2a84cd857ed (patch) | |
tree | bbb668e94826b59e3d951f4acfb66e05dc45a896 /lib/argp-fmtstream.c | |
parent | be10b8978512e646830ec849964b5fc5fb1a8619 (diff) | |
download | gnulib-96f649aa3b7ee7d6814ecce639bde2a84cd857ed.tar.gz |
(__argp_fmtstream_update): Fix coredump
Diffstat (limited to 'lib/argp-fmtstream.c')
-rw-r--r-- | lib/argp-fmtstream.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/argp-fmtstream.c b/lib/argp-fmtstream.c index 0ba19c5aeb..0dd9256f57 100644 --- a/lib/argp-fmtstream.c +++ b/lib/argp-fmtstream.c @@ -246,9 +246,10 @@ __argp_fmtstream_update (argp_fmtstream_t fs) Oh well. Put it on an overlong line by itself. */ p = buf + (r + 1 - fs->point_col); /* Find the end of the long word. */ - do - ++p; - while (p < nl && !isblank (*p)); + if (p < nl) + do + ++p; + while (p < nl && !isblank (*p)); if (p == nl) { /* It already ends a line. No fussing required. */ |