diff options
author | Marius Vollmer <mvo@zagadka.de> | 2005-05-22 17:19:17 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2005-05-22 17:19:17 +0000 |
commit | 14bed4cc2663d19647c0fa8c2b73c84ad8f06262 (patch) | |
tree | 248494306122b8dba6b79b586a77ea62ae50da90 /libguile/unif.c | |
parent | 9e664475b989a1d409f1b99d285c49796b49d2fa (diff) | |
download | guile-14bed4cc2663d19647c0fa8c2b73c84ad8f06262.tar.gz |
(scm_make_shared_array): Add old base to new base since
scm_array_handle_pos does not include the base.
(scm_aind): Likewise.
Diffstat (limited to 'libguile/unif.c')
-rw-r--r-- | libguile/unif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/unif.c b/libguile/unif.c index ff6cc3209..b7dd02070 100644 --- a/libguile/unif.c +++ b/libguile/unif.c @@ -897,7 +897,7 @@ SCM_DEFINE (scm_make_shared_array, "make-shared-array", 2, 0, 1, imap = scm_apply_0 (mapfunc, scm_reverse (inds)); i = scm_array_handle_pos (&old_handle, imap); - SCM_I_ARRAY_BASE (ra) = new_min = new_max = i; + SCM_I_ARRAY_BASE (ra) = new_min = new_max = i + SCM_I_ARRAY_BASE (oldra); indptr = inds; k = SCM_I_ARRAY_NDIM (ra); while (k--) @@ -2885,7 +2885,7 @@ scm_aind (SCM ra, SCM args, const char *what) args = scm_list_1 (args); scm_array_get_handle (ra, &handle); - pos = scm_array_handle_pos (&handle, args); + pos = scm_array_handle_pos (&handle, args) + SCM_I_ARRAY_BASE (ra); scm_array_handle_release (&handle); return pos; } |