fixed incorrect processing of decimal separator
This commit is contained in:
parent
0ef65d232f
commit
a1e3484117
@ -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.dc_ibase 2007-08-22 08:37:57.000000000 +0200
|
||||||
+++ bc-1.06/dc/numeric.c 2007-07-26 15:47:42.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
|
@@ -285,6 +285,8 @@ dc_getnum DC_DECLARG((input, ibase, read
|
||||||
int digit;
|
int digit;
|
||||||
int decimal;
|
int decimal;
|
||||||
@ -36,7 +36,19 @@
|
|||||||
}
|
}
|
||||||
if (c == '.'){
|
if (c == '.'){
|
||||||
bc_free_num(&build);
|
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';
|
digit = 10 + c - 'A';
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
6
bc.spec
6
bc.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: GNU's bc (a numeric processing language) and dc (a calculator)
|
Summary: GNU's bc (a numeric processing language) and dc (a calculator)
|
||||||
Name: bc
|
Name: bc
|
||||||
Version: 1.06
|
Version: 1.06
|
||||||
Release: 27
|
Release: 28
|
||||||
License: GPL
|
License: GPL
|
||||||
URL: http://www.gnu.org/software/bc/
|
URL: http://www.gnu.org/software/bc/
|
||||||
Group: Applications/Engineering
|
Group: Applications/Engineering
|
||||||
@ -70,6 +70,10 @@ exit 0
|
|||||||
%{_infodir}/*
|
%{_infodir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 22 2007 Zdenek Prikryl <zprikryl@redhat.com> 1.06-28
|
||||||
|
- fixed incorrect processing of decimal separator
|
||||||
|
- Resolves: #253729
|
||||||
|
|
||||||
* Thu Jul 26 2007 Zdenek Prikryl <zprikryl@redhat.com> 1.06-27
|
* Thu Jul 26 2007 Zdenek Prikryl <zprikryl@redhat.com> 1.06-27
|
||||||
- dc accepts the input which contains wrong symbols of radix in same way like bc
|
- dc accepts the input which contains wrong symbols of radix in same way like bc
|
||||||
- Resolves: #151844
|
- Resolves: #151844
|
||||||
|
Loading…
Reference in New Issue
Block a user