swfc: parse percent values as floating point
authorMatthias Kramm <kramm@quiss.org>
Fri, 10 Apr 2009 22:26:52 +0000 (00:26 +0200)
committerMatthias Kramm <kramm@quiss.org>
Fri, 10 Apr 2009 22:26:52 +0000 (00:26 +0200)
src/swfc.c

index 646ec80..f07d424 100644 (file)
@@ -2714,7 +2714,7 @@ float parsePercent(const char*str)
     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;