You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bj...@apache.org on 2010/06/22 12:57:00 UTC
svn commit: r956849 - /apr/apr/trunk/file_io/os2/readwrite.c
Author: bjh
Date: Tue Jun 22 10:56:59 2010
New Revision: 956849
URL: http://svn.apache.org/viewvc?rev=956849&view=rev
Log:
OS/2: Fix incorrect value in nbytes parameter to apr_file_read() after use of
apr_file_ungetc().
Modified:
apr/apr/trunk/file_io/os2/readwrite.c
Modified: apr/apr/trunk/file_io/os2/readwrite.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/os2/readwrite.c?rev=956849&r1=956848&r2=956849&view=diff
==============================================================================
--- apr/apr/trunk/file_io/os2/readwrite.c (original)
+++ apr/apr/trunk/file_io/os2/readwrite.c Tue Jun 22 10:56:59 2010
@@ -55,9 +55,9 @@ APR_DECLARE(apr_status_t) apr_file_read(
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) {