diff options
Diffstat (limited to 'apps/plugins/puzzles/src/misc.c')
-rw-r--r-- | apps/plugins/puzzles/src/misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/puzzles/src/misc.c b/apps/plugins/puzzles/src/misc.c index 2bf35d391b..816d47e43a 100644 --- a/apps/plugins/puzzles/src/misc.c +++ b/apps/plugins/puzzles/src/misc.c | |||
@@ -375,7 +375,7 @@ void copy_left_justified(char *buf, size_t sz, const char *str) | |||
375 | /* another kludge for platforms without %g support in *printf() */ | 375 | /* another kludge for platforms without %g support in *printf() */ |
376 | int ftoa(char *buf, float f) | 376 | int ftoa(char *buf, float f) |
377 | { | 377 | { |
378 | return sprintf(buf, "%d.%06d", (int)f, (int)((f - (int)f)*1e6)); | 378 | return sprintf(buf, "%d.%06d", (int)f, abs((int)((f - (int)f)*1e6))); |
379 | } | 379 | } |
380 | 380 | ||
381 | /* vim: set shiftwidth=4 tabstop=8: */ | 381 | /* vim: set shiftwidth=4 tabstop=8: */ |