From a56a9ae9e9a77ebc73fda6281b4b506a5ea3112f Mon Sep 17 00:00:00 2001 From: eknauel Date: Thu, 12 Feb 2004 09:10:04 +0000 Subject: [PATCH] * ffi-tools/ffi-tools.c (ffit_extract_list_of_strings): fixed wrong pointer handling --- ffi-tools/ffi-tools.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ffi-tools/ffi-tools.c b/ffi-tools/ffi-tools.c index 83b26b9..da1e223 100644 --- a/ffi-tools/ffi-tools.c +++ b/ffi-tools/ffi-tools.c @@ -59,7 +59,7 @@ char** ffit_extract_list_of_strings(s48_value list) S48_GC_PROTECT_3(list, res, e); l = length_scheme_list(list); - if ((*a = (char *) calloc(l + 1, sizeof(char *))) == NULL) + if ((a = (char **) calloc(l + 1, sizeof(char *))) == NULL) s48_raise_out_of_memory_error(); a[l] = NULL; @@ -67,8 +67,8 @@ char** ffit_extract_list_of_strings(s48_value list) i = 0; while (e != S48_NULL) { if (S48_PAIR_P(e)) - if (S48_STRING_P(e)) { - a[i] = s48_extract_string(e); + if (S48_STRING_P(S48_CAR(e))) { + a[i] = s48_extract_string(S48_CAR(e)); e = S48_CDR(e); i++; }