diff --git a/Übung 2/util.c b/Übung 2/util.c index 1f96ab3..81bd537 100644 --- a/Übung 2/util.c +++ b/Übung 2/util.c @@ -15,13 +15,13 @@ bool is_num(char *str) { return false; } while (*str) { - if (!isdigit((unsigned char)*str) || !(*str == '.')) { - return true; + if (!isdigit((unsigned char)*str)) { + return false; } str++; } - return false; + return true; } bool is_int(char *str) { @@ -33,7 +33,7 @@ bool is_int(char *str) { } while (*str) { if (!isdigit((unsigned char)*str)) { - return true; + return false; } str++; }