* ffi-tools/ffi-tools.c (ffit_extract_list_of_strings): fixed

wrong pointer handling
This commit is contained in:
eknauel 2004-02-12 09:10:04 +00:00
parent 092160e721
commit a56a9ae9e9
1 changed files with 3 additions and 3 deletions

View File

@ -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++;
}