From c0b5c749e0ddcf716f398ed08cd939c71a3b68d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Wed, 20 Apr 2016 17:31:18 +0200 Subject: [PATCH] 2016-04-20 17:31 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/hbstrfmt.c * add to output trailing % in format pattern just like other % characters which are not part of valid format string, i.e. in this code: ? hb_StrFormat( "%-% %1%q%*%" ) only the last % was silently eaten from output --- ChangeLog.txt | 7 +++++++ src/rtl/hbstrfmt.c | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 4e36fe0ca3..1838db583e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,13 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2016-04-20 17:31 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/rtl/hbstrfmt.c + * add to output trailing % in format pattern just like other % characters + which are not part of valid format string, i.e. in this code: + ? hb_StrFormat( "%-% %1%q%*%" ) + only the last % was silently eaten from output + 2016-04-20 17:19 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/hbstrfmt.c ! fixed wrongly added to output character after unclosed format strings, diff --git a/src/rtl/hbstrfmt.c b/src/rtl/hbstrfmt.c index 154a588578..66255a9943 100644 --- a/src/rtl/hbstrfmt.c +++ b/src/rtl/hbstrfmt.c @@ -122,9 +122,6 @@ PHB_ITEM hb_strFormat( PHB_ITEM pItemReturn, PHB_ITEM pItemFormat, int iCount, P pFmtSave = pFmt; - if( ++pFmt >= pFmtEnd ) - continue; - if( *pFmt == '%' ) { bufadd( &buffer, pFmt++, 1 );