From d917129d502a753f13bd26ecf47a30d31f738fc1 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Thu, 21 Nov 2019 18:17:18 -0500 Subject: Fixed empty loop causeing infinite loop If a loop was defined in the template, but no loop was defined in the varlist, render() would infinite loop while trying to execute. Fixs that. --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bbe43f5..e8375b1 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ objfiles = $(objs:%=build/%.o) TEST_1_NAME = t/test_1$(BIN_POSTFIX) TEST_2_NAME = t/test_2$(BIN_POSTFIX) +TEST_3_NAME = t/test_3$(BIN_POSTFIX) examples=hello variable example_bins=$(examples:%=examples/%$(BIN_POSTFIX)) @@ -36,9 +37,13 @@ $(TEST_1_NAME): t/test_1.c $(LIBNAME) $(TEST_2_NAME): t/test_2.c $(LIBNAME) $(CC) $(CFLAGS) -o $@ $< -lctemplates -test: $(TEST_1_NAME) $(TEST_2_NAME) +$(TEST_3_NAME): t/test_3.c $(LIBNAME) + $(CC) $(CFLAGS) -o $@ $< -lctemplates + +test: $(TEST_1_NAME) $(TEST_2_NAME) $(TEST_3_NAME) #$(TEST_1_NAME) - $(TEST_2_NAME) + #$(TEST_2_NAME) + $(TEST_3_NAME) examples: $(example_bins) $(example_bins) -- cgit v1.2.3-70-g09d2