diff options
author | Brian Havard <bjh@apache.org> | 2010-06-22 10:56:59 +0000 |
---|---|---|
committer | Brian Havard <bjh@apache.org> | 2010-06-22 10:56:59 +0000 |
commit | 72cae69af9984353555514c7be15da02b69c532d (patch) | |
tree | 3d165f89f884de9fbdf9d469ed10896245ef60ff /file_io/os2 | |
parent | b4688d853484d0d68d5188f2a099c5af3ab0477d (diff) | |
download | apr-72cae69af9984353555514c7be15da02b69c532d.tar.gz |
OS/2: Fix incorrect value in nbytes parameter to apr_file_read() after use of
apr_file_ungetc().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@956849 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/os2')
-rw-r--r-- | file_io/os2/readwrite.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c index 6eb59fcc0..4f99a4ef4 100644 --- a/file_io/os2/readwrite.c +++ b/file_io/os2/readwrite.c @@ -55,9 +55,9 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size if (thefile->ungetchar != -1 && req_nbytes >= 1) { *(char *)buf = (char)thefile->ungetchar; - (char *)buf++; - (*nbytes)--; thefile->ungetchar = -1; + (*nbytes) = 1; + return APR_SUCCESS; } if (thefile->buffered) { |