From f1013454db79141f5d6f3520d786c1ed34c8aeb1 Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Tue, 21 Oct 2008 06:03:31 -0400 Subject: [PATCH] fixed wrong endianness in bytevector-[su]32-native-ref. --- scheme/ikarus.bytevectors.ss | 20 ++++++++++---------- scheme/last-revision | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scheme/ikarus.bytevectors.ss b/scheme/ikarus.bytevectors.ss index 83f0dad..599c8d8 100644 --- a/scheme/ikarus.bytevectors.ss +++ b/scheme/ikarus.bytevectors.ss @@ -258,12 +258,12 @@ ($fx<= 0 i) ($fx= 0 ($fxlogand i 3)) ($fx< i ($fx- ($bytevector-length x) 3))) - (+ (sll ($bytevector-u8-ref x i) 24) + (+ (sll ($bytevector-u8-ref x ($fx+ i 3)) 24) ($fxlogor - ($fxsll ($bytevector-u8-ref x ($fx+ i 1)) 16) - ($fxlogor - ($fxsll ($bytevector-u8-ref x ($fx+ i 2)) 8) - ($bytevector-u8-ref x ($fx+ i 3))))) + ($fxsll ($bytevector-u8-ref x ($fx+ i 2)) 16) + ($fxlogor + ($fxsll ($bytevector-u8-ref x ($fx+ i 1)) 8) + ($bytevector-u8-ref x i)))) (die 'bytevector-u32-native-ref "invalid index" i)) (die 'bytevector-u32-native-ref "not a bytevector" x)))) @@ -299,12 +299,12 @@ ($fx<= 0 i) ($fx= 0 ($fxlogand i 3)) ($fx< i ($fx- ($bytevector-length x) 3))) - (+ (sll ($bytevector-s8-ref x i) 24) + (+ (sll ($bytevector-s8-ref x ($fx+ i 3)) 24) ($fxlogor - ($fxsll ($bytevector-u8-ref x ($fx+ i 1)) 16) - ($fxlogor - ($fxsll ($bytevector-u8-ref x ($fx+ i 2)) 8) - ($bytevector-u8-ref x ($fx+ i 3))))) + ($fxsll ($bytevector-u8-ref x ($fx+ i 2)) 16) + ($fxlogor + ($fxsll ($bytevector-u8-ref x ($fx+ i 1)) 8) + ($bytevector-u8-ref x i)))) (die 'bytevector-s32-native-ref "invalid index" i)) (die 'bytevector-s32-native-ref "not a bytevector" x)))) diff --git a/scheme/last-revision b/scheme/last-revision index a0af042..9d1731d 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1641 +1642