diff options
Diffstat (limited to 'lib/numbers.c')
-rw-r--r-- | lib/numbers.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/numbers.c b/lib/numbers.c index 8334dd4..eb56f2c 100644 --- a/lib/numbers.c +++ b/lib/numbers.c @@ -3,9 +3,9 @@ int char_to_number(char *st, int *valid) { int whattype = 0, result = 0; - + *valid = 0; - + if (*st == '0') { st++; if (*st == 'x') { @@ -18,7 +18,7 @@ int char_to_number(char *st, int *valid) return 0; } } - + while (*st) { switch (whattype) { case 0: @@ -52,7 +52,7 @@ int char_to_number(char *st, int *valid) } st++; } - + *valid = 1; return result; } |