diff options
author | inmarket <andrewh@inmarket.com.au> | 2015-02-21 09:23:00 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2015-02-21 09:23:00 +1000 |
commit | 5e0a0bfd9b6db8e65bb6052d7b65547e803de42b (patch) | |
tree | 1cbd3a45cbbdf38589f0fab9f88848111dbbf3ca /src/gfile/gfile_printg.c | |
parent | 6132b7f349fa69df02a999d00dcd260c04511aef (diff) | |
download | uGFX-5e0a0bfd9b6db8e65bb6052d7b65547e803de42b.tar.gz uGFX-5e0a0bfd9b6db8e65bb6052d7b65547e803de42b.tar.bz2 uGFX-5e0a0bfd9b6db8e65bb6052d7b65547e803de42b.zip |
Compile error fix for GFILE_ALLOW_FLOAT
Diffstat (limited to 'src/gfile/gfile_printg.c')
-rw-r--r-- | src/gfile/gfile_printg.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gfile/gfile_printg.c b/src/gfile/gfile_printg.c index d11bb24d..5715a45a 100644 --- a/src/gfile/gfile_printg.c +++ b/src/gfile/gfile_printg.c @@ -59,7 +59,7 @@ int vfnprintg(GFILE *f, int maxlen, const char *fmt, va_list arg) { bool_t is_long, left_align; long l; #if GFILE_ALLOW_FLOATS - float f; + float fpv; char tmpbuf[2*MAX_FILLER + 1]; #else char tmpbuf[MAX_FILLER + 1]; @@ -156,15 +156,15 @@ int vfnprintg(GFILE *f, int maxlen, const char *fmt, va_list arg) { break; #if GFILE_ALLOW_FLOATS case 'f': - f = (float) va_arg(arg, double); - if (f < 0) { + fpv = (float) va_arg(arg, double); + if (fpv < 0) { *p++ = '-'; - f = -f; + fpv = -fpv; } - l = f; + l = fpv; p = ltoa_wd(p, l, 10, 0); *p++ = '.'; - l = (f - l) * FLOAT_PRECISION; + l = (fpv - l) * FLOAT_PRECISION; p = ltoa_wd(p, l, 10, FLOAT_PRECISION / 10); break; #endif |