git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e4687b3
)
swfc: parse percent values as floating point
author
Matthias Kramm
<kramm@quiss.org>
Fri, 10 Apr 2009 22:26:52 +0000
(
00:26
+0200)
committer
Matthias Kramm
<kramm@quiss.org>
Fri, 10 Apr 2009 22:26:52 +0000
(
00:26
+0200)
src/swfc.c
patch
|
blob
|
history
diff --git
a/src/swfc.c
b/src/swfc.c
index
646ec80
..
f07d424
100644
(file)
--- a/
src/swfc.c
+++ b/
src/swfc.c
@@
-2714,7
+2714,7
@@
float parsePercent(const char*str)
if(!l)
return 1.0;
if(str[l-1]=='%') {
if(!l)
return 1.0;
if(str[l-1]=='%') {
- return atoi(str)/100.0;
+ return atof(str)/100.0;
}
syntaxerror("Expression '%s' is not a percentage", str);
return 0;
}
syntaxerror("Expression '%s' is not a percentage", str);
return 0;