diff options
Diffstat (limited to 'contrib/gdtoa/test/getround.c')
-rw-r--r-- | contrib/gdtoa/test/getround.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/gdtoa/test/getround.c b/contrib/gdtoa/test/getround.c index 1754fb3..786bcc3 100644 --- a/contrib/gdtoa/test/getround.c +++ b/contrib/gdtoa/test/getround.c @@ -44,7 +44,14 @@ getround(int r, char *s) { int i; - i = atoi(s+1); + while(*++s <= ' ') { + if (!*s) { + printf("Current round mode for strtor... is %d (%s).\n", + r, dir[r]); + return r; + } + } + i = atoi(s); if (i >= 0 && i < 4) { printf("Rounding mode for strtor... "); if (i == r) |