diff --git a/main.leg b/main.leg index dfd8522..dac6113 100644 --- a/main.leg +++ b/main.leg @@ -1,6 +1,6 @@ # main.leg -- C parser + interpreter # -# Last edited: 2025-02-03 10:47:46 by piumarta on xubuntu +# Last edited: 2025-02-03 11:58:41 by piumarta on xubuntu %{ ; @@ -1738,7 +1738,7 @@ void startInput(char *name) void endInput(void) { - if (List_size(lines)) { + if (lines && List_size(lines)) { lineNo = _integerValue(List_popLast(lines)); List_popLast(names); } diff --git a/test.txt b/test.txt index 87594ee..4c7e56b 100755 --- a/test.txt +++ b/test.txt @@ -142,8 +142,6 @@ int main(int argc, char **argv) printf("passed\n"); - float f = 42; - return 0; }