mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
(scm_array_set_x): For svect, use scm_num2short to get range
check, previously silently truncated inum to short.
This commit is contained in:
parent
1ddea1ca51
commit
b36f6804b0
1 changed files with 2 additions and 2 deletions
|
@ -1339,8 +1339,8 @@ SCM_DEFINE (scm_array_set_x, "array-set!", 2, 0, 1,
|
|||
= scm_num2long (obj, SCM_ARG2, FUNC_NAME);
|
||||
break;
|
||||
case scm_tc7_svect:
|
||||
SCM_ASRTGO (SCM_INUMP (obj), badobj);
|
||||
((short *) SCM_UVECTOR_BASE (v))[pos] = SCM_INUM (obj);
|
||||
((short *) SCM_UVECTOR_BASE (v))[pos]
|
||||
= scm_num2short (obj, SCM_ARG2, FUNC_NAME);
|
||||
break;
|
||||
#ifdef HAVE_LONG_LONGS
|
||||
case scm_tc7_llvect:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue