about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDaniel <steew0x8@protonmail.com>2021-11-03 23:39:44 +0100
committerDaniel <steew0x8@protonmail.com>2021-11-03 23:39:44 +0100
commitab903e904fa4b994497bff231447db49d7040fa4 (patch)
treeed3b30eb286a3e4461981f465b007aae5cf1bb4b
parente7748c3eb607ace655bc48d807cbbc116960a611 (diff)
downloadrpncalc-ab903e904fa4b994497bff231447db49d7040fa4.tar.gz
fix
-rw-r--r--util.c6
-rw-r--r--util.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/util.c b/util.c
index 555c445..c4dd940 100644
--- a/util.c
+++ b/util.c
@@ -24,9 +24,7 @@ int is_operator(char *s) {
 }
 
 TYPE discriminate(char *s) {
-  if (is_decimal(s)) {
-    return DOUBLE;
-  } else if (is_operator(s)) {
+  if (is_operator(s)) {
     return OPERATOR;
-  } else return INT;
+  } else return DOUBLE;
 }
diff --git a/util.h b/util.h
index 18fb507..5f948d9 100644
--- a/util.h
+++ b/util.h
@@ -2,6 +2,6 @@
 #define UTIL_H
 
 typedef enum {OPERATOR, DOUBLE, FUNCTION} TYPE;
-int discriminate(char *s);
+TYPE discriminate(char *s);
 
 #endif