From: nishi Date: Fri, 26 Apr 2024 03:25:19 +0000 (+0000) Subject: repl should be fixed X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=5bb3ba824cc04f3d84b171828395e706effe5746;p=serenade.git repl should be fixed git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@41 0f02c867-ac3d-714e-8a88-971ba1f6efcf --- 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;