mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 04:40:29 +02:00
RTL VM: Fix LOCAL_REF, LOCAL_SET for unsigned indices
* libguile/vm-engine.c (LOCAL_REF, LOCAL_SET): Fix so to work with unsigned 0. Previously subtracting 1 was making the index wrap around.
This commit is contained in:
parent
a4b64fa246
commit
8cff7f54dc
1 changed files with 2 additions and 2 deletions
|
@ -628,8 +628,8 @@ VM_NAME (SCM vm, SCM program, SCM *argv, int nargs)
|
|||
case opcode:
|
||||
#endif
|
||||
|
||||
#define LOCAL_REF(i) SCM_FRAME_VARIABLE (fp, (i) - 1)
|
||||
#define LOCAL_SET(i,o) SCM_FRAME_VARIABLE (fp, (i) - 1) = o
|
||||
#define LOCAL_REF(i) SCM_FRAME_VARIABLE ((fp - 1), i)
|
||||
#define LOCAL_SET(i,o) SCM_FRAME_VARIABLE ((fp - 1), i) = o
|
||||
|
||||
#define VARIABLE_REF(v) SCM_VARIABLE_REF (v)
|
||||
#define VARIABLE_SET(v,o) SCM_VARIABLE_SET (v, o)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue