From 0dc484092b84ca98b66bdcc7e017d40d2cb8d049 Mon Sep 17 00:00:00 2001 From: Sophia Weber Date: Sat, 27 Jan 2024 17:45:48 +0100 Subject: [PATCH] fix formular parse detection bug --- src/inputHandling.c | 10 +++++----- src/inputHandling.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/inputHandling.c b/src/inputHandling.c index e579f27..f2edfc1 100644 --- a/src/inputHandling.c +++ b/src/inputHandling.c @@ -25,13 +25,12 @@ void input() { } else { printf("Formular %s not supported", temp.formel); } - } //Leerzeichen löschen void deleteWhitespace(){ for(int i=0; iarraylength=i; //Länge des Arrays (also zu berechnende Zahlen) gespeichert - if (readFunction(splitPnt, strlen(splitPnt)!=opNotSupported)){ - return splitPnt; - } else { + if (readFunction(splitPnt, strlen(splitPnt)+1)!=opNotSupported){ return NULL; + } else { + return splitPnt; } } diff --git a/src/inputHandling.h b/src/inputHandling.h index 676b08d..71bd8f1 100644 --- a/src/inputHandling.h +++ b/src/inputHandling.h @@ -2,7 +2,7 @@ #define INPUTHANDLING_H typedef enum{ - opAdd, opSub, opDiv, opMult, opExp, opLog, opNotSupported + opAdd, opSub, opDiv, opMult, opExp, opLog, opEmpty, opNotSupported }op; typedef struct {