Return-Path: X-Original-To: apmail-apr-commits-archive@www.apache.org Delivered-To: apmail-apr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49D2567EA for ; Fri, 29 Jul 2011 17:32:24 +0000 (UTC) Received: (qmail 37191 invoked by uid 500); 29 Jul 2011 17:32:24 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 37122 invoked by uid 500); 29 Jul 2011 17:32:24 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 37115 invoked by uid 99); 29 Jul 2011 17:32:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2011 17:32:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2011 17:32:22 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E34AD23889BB for ; Fri, 29 Jul 2011 17:32:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1152315 - in /apr/apr/branches/0.9.x: CHANGES strings/apr_snprintf.c Date: Fri, 29 Jul 2011 17:32:02 -0000 To: commits@apr.apache.org From: rjung@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110729173202.E34AD23889BB@eris.apache.org> Author: rjung Date: Fri Jul 29 17:32:01 2011 New Revision: 1152315 URL: http://svn.apache.org/viewvc?rev=1152315&view=rev Log: Fix flag character '#' in combination with format character 'x' in apr snprintf implementations. Modified: apr/apr/branches/0.9.x/CHANGES apr/apr/branches/0.9.x/strings/apr_snprintf.c Modified: apr/apr/branches/0.9.x/CHANGES URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/CHANGES?rev=1152315&r1=1152314&r2=1152315&view=diff ============================================================================== --- apr/apr/branches/0.9.x/CHANGES [utf-8] (original) +++ apr/apr/branches/0.9.x/CHANGES [utf-8] Fri Jul 29 17:32:01 2011 @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with APR 0.9.20 + *) Fix flag character '#' in combination with format character 'x' in + apr snprintf implementations. [Rainer Jung] Changes with APR 0.9.19 Modified: apr/apr/branches/0.9.x/strings/apr_snprintf.c URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/strings/apr_snprintf.c?rev=1152315&r1=1152314&r2=1152315&view=diff ============================================================================== --- apr/apr/branches/0.9.x/strings/apr_snprintf.c (original) +++ apr/apr/branches/0.9.x/strings/apr_snprintf.c Fri Jul 29 17:32:01 2011 @@ -694,7 +694,7 @@ APR_DECLARE(int) apr_vformatter(int (*fl widest_int i_quad = (widest_int) 0; u_widest_int ui_quad; wide_int i_num = (wide_int) 0; - u_wide_int ui_num; + u_wide_int ui_num = (u_wide_int) 0; char num_buf[NUM_BUF_SIZE]; char char_buf[2]; /* for printing %% and % */ @@ -931,7 +931,7 @@ APR_DECLARE(int) apr_vformatter(int (*fl &num_buf[NUM_BUF_SIZE], &s_len); } FIX_PRECISION(adjust_precision, precision, s, s_len); - if (alternate_form && i_num != 0) { + if (alternate_form && ui_num != 0) { *--s = *fmt; /* 'x' or 'X' */ *--s = '0'; s_len += 2;