From a1e348411737ee81d9209f0a0d05b02d524f5d47 Mon Sep 17 00:00:00 2001 From: Zdenek Prikryl Date: Wed, 22 Aug 2007 06:49:20 +0000 Subject: [PATCH] fixed incorrect processing of decimal separator --- bc-1.06-dc_ibase.patch | 18 +++++++++++++++--- bc.spec | 6 +++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/bc-1.06-dc_ibase.patch b/bc-1.06-dc_ibase.patch index aeebd10..7d5fa20 100644 --- a/bc-1.06-dc_ibase.patch +++ b/bc-1.06-dc_ibase.patch @@ -1,5 +1,5 @@ ---- bc-1.06/dc/numeric.c.dc_ibase 2000-08-31 17:57:42.000000000 +0200 -+++ bc-1.06/dc/numeric.c 2007-07-26 15:47:42.000000000 +0200 +--- bc-1.06/dc/numeric.c.dc_ibase 2007-08-22 08:37:57.000000000 +0200 ++++ bc-1.06/dc/numeric.c 2007-08-22 08:37:40.000000000 +0200 @@ -285,6 +285,8 @@ dc_getnum DC_DECLARG((input, ibase, read int digit; int decimal; @@ -36,7 +36,19 @@ } if (c == '.'){ bc_free_num(&build); -@@ -328,6 +338,7 @@ dc_getnum DC_DECLARG((input, ibase, read +@@ -321,13 +331,18 @@ dc_getnum DC_DECLARG((input, ibase, read + build = bc_copy_num(_zero_); + decimal = 0; + for (;;){ +- c = (*input)(); ++ if (c_buff) { ++ c = c_buff; ++ c_buff = 0; ++ } else ++ c = (*input)(); + if (isdigit(c)) + digit = c - '0'; + else if ('A' <= c && c <= 'F') digit = 10 + c - 'A'; else break; diff --git a/bc.spec b/bc.spec index f842140..037a6e8 100644 --- a/bc.spec +++ b/bc.spec @@ -1,7 +1,7 @@ Summary: GNU's bc (a numeric processing language) and dc (a calculator) Name: bc Version: 1.06 -Release: 27 +Release: 28 License: GPL URL: http://www.gnu.org/software/bc/ Group: Applications/Engineering @@ -70,6 +70,10 @@ exit 0 %{_infodir}/* %changelog +* Thu Aug 22 2007 Zdenek Prikryl 1.06-28 +- fixed incorrect processing of decimal separator +- Resolves: #253729 + * Thu Jul 26 2007 Zdenek Prikryl 1.06-27 - dc accepts the input which contains wrong symbols of radix in same way like bc - Resolves: #151844