Soft'N'Design Software
/
projects
/
calc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
371f794
)
correct convertion from non decimal base
author
Laurent Mazet
<mazet@softndesign.org>
Tue, 26 Dec 2023 02:51:13 +0000
(
03:51
+0100)
committer
Laurent Mazet
<mazet@softndesign.org>
Tue, 26 Dec 2023 02:51:13 +0000
(
03:51
+0100)
parser.c
patch
|
blob
|
blame
|
history
diff --git
a/parser.c
b/parser.c
index 44152a96cc4cb1a5f3fd655642b49de0b863d51e..7880acfa156c049e13c778cc5c280faec0f3c412 100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-290,7
+290,7
@@
element_t *parser (char *str, char **next, int prio)
VERBOSE (DEBUG, fprintf (stdout, "start processing value\n"));
char *pt;
- double value = (get_ibase () == 10) ? strtod (str, &pt) : strto
u
l (str, &pt, get_ibase ());
+ double value = (get_ibase () == 10) ? strtod (str, &pt) : strtol (str, &pt, get_ibase ());
VERBOSE (INFO, fprintf (stdout, "Value: %f\n", value));
if (str != pt) {
if ((root == NULL) || (root->prio == 6)) {