From 5bb3ba824cc04f3d84b171828395e706effe5746 Mon Sep 17 00:00:00 2001 From: nishi Date: Fri, 26 Apr 2024 03:25:19 +0000 Subject: [PATCH] repl should be fixed git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@41 0f02c867-ac3d-714e-8a88-971ba1f6efcf --- Serenade/interpreter.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Serenade/interpreter.c b/Serenade/interpreter.c index 29a8a72..2e24cc9 100644 --- a/Serenade/interpreter.c +++ b/Serenade/interpreter.c @@ -150,9 +150,9 @@ void sn_interpreter_free(struct sn_interpreter* sn) { free(sn->variables[i]); } free(sn->variables); - for(i = 0; sn->generics[i] != NULL; i++){ + for(i = 0; sn->generics[i] != NULL; i++) { int j; - for(j = 0; sn->generics[i][j] != NULL; j++) sn_generic_free(sn->generics[i][j]); + for(j = 0; sn->generics[i][j] != NULL; j++) sn_generic_free(sn->generics[i][j]); free(sn->generics[i]); } free(sn->generics); @@ -226,9 +226,10 @@ int sn_eval(struct sn_interpreter* sn, char* data, unsigned long long len) { } int j; struct sn_generic*** oldgens = sn->generics; - for(j = 0; oldgens[j] != NULL; j++); + for(j = 0; oldgens[j] != NULL; j++) + ; sn->generics = malloc(sizeof(struct sn_generic**) * (j + 2)); - for(j = 0; oldgens[j] != NULL; j++){ + for(j = 0; oldgens[j] != NULL; j++) { sn->generics[j] = oldgens[j]; } sn->generics[j] = gens; -- 2.43.0