From: kramm Date: Tue, 8 Jul 2008 09:27:39 +0000 (+0000) Subject: fixed negative twip parsing problem X-Git-Tag: buttons-working~98 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=443451804018eb823e284cf9a4da1733668ee839 fixed negative twip parsing problem --- diff --git a/src/swfc.c b/src/swfc.c index ee86802..f2224a1 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -2418,7 +2418,7 @@ int parseTwip(char*str) char*p = str; int val = 0; char ex = 0; - char*lastpos = str; + char*lastpos = 0; while(*p) { if(*p == '+' || *p == '-' || *p == '/' || *p == '*') ex = *p; @@ -2440,6 +2440,7 @@ int parseTwip(char*str) v = parseRawTwip(lastpos); } *p = save; + printf("%f %c= %f\n", val/20.0, ex, v/20.0); if(ex == '+') val += v; else if(ex == '-') @@ -2454,6 +2455,7 @@ int parseTwip(char*str) lastpos = 0; } } + printf("%s -> %.2f\n", str, val/20.0); return val; }