Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 23394 invoked by uid 500); 8 Oct 2001 17:37:00 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 23383 invoked from network); 8 Oct 2001 17:37:00 -0000 Date: 8 Oct 2001 17:33:14 -0000 Message-ID: <20011008173314.98016.qmail@icarus.apache.org> From: wrowe@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/file_io/win32 open.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N wrowe 01/10/08 10:33:14 Modified: file_io/win32 open.c Log: Forgot to update chars to decode and used the wrong buffer remaining var Revision Changes Path 1.83 +2 -2 apr/file_io/win32/open.c Index: open.c =================================================================== RCS file: /home/cvs/apr/file_io/win32/open.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- open.c 2001/09/05 04:50:30 1.82 +++ open.c 2001/10/08 17:33:14 1.83 @@ -81,7 +81,6 @@ * \\?\UNC\ is needed UNC paths. */ int srcremains = strlen(srcstr) + 1; - int retremains = srcremains; apr_wchar_t *t = retstr; apr_status_t rv; if (srcstr[1] == ':' && (srcstr[2] == '/' || srcstr[2] == '\\')) { @@ -94,12 +93,13 @@ && (srcstr[2] != '?')) { /* Skip the slashes */ srcstr += 2; + srcremains -= 2; wcscpy (retstr, L"\\\\?\\UNC\\"); retlen -= 8; t += 8; } - if (rv = conv_utf8_to_ucs2(srcstr, &srcremains, t, &retremains)) { + if (rv = conv_utf8_to_ucs2(srcstr, &srcremains, t, &retlen)) { return (rv == APR_INCOMPLETE) ? APR_EINVAL : rv; } if (srcremains) {