summaryrefslogtreecommitdiffstats
path: root/src/utils/string.c
diff options
context:
space:
mode:
authorAndrés <andmarti@gmail.com>2021-04-07 15:36:55 -0300
committerAndrés <andmarti@gmail.com>2021-04-07 15:36:55 -0300
commit8b704f2219ca724431d3dcdc640b3b4c15338cea (patch)
tree128ba488102375952807ca5d323a2e9a3315def8 /src/utils/string.c
parentec610da75f918dd58d8aa7c352b4cd6716201f9f (diff)
changed isnumeric function so a plain 'e' would not be considered as number
Diffstat (limited to 'src/utils/string.c')
-rwxr-xr-xsrc/utils/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/string.c b/src/utils/string.c
index 76cf63e..6cc52aa 100755
--- a/src/utils/string.c
+++ b/src/utils/string.c
@@ -362,7 +362,7 @@ int isnumeric(char * string) {
continue;
}
- if ( (string[i] == 'e' || string[i] == 'E') && ! has_exponent ) {
+ if ( (string[i] == 'e' || string[i] == 'E') && ! has_exponent && len > 1) {
has_exponent = true;
has_sign = false; // allow sign for exponent
continue;