--- a/JavaVM.st Tue Oct 20 14:10:21 1998 +0000
+++ b/JavaVM.st Tue Oct 20 15:04:31 1998 +0000
@@ -3647,7 +3647,7 @@
!
_System_arraycopy:nativeContext
- |srcArray srcIdx dstArray dstIdx count|
+ |srcArray srcIdx dstArray dstIdx count dstEndIdx|
srcArray := nativeContext argAt:1.
srcIdx := nativeContext argAt:2.
@@ -3655,18 +3655,22 @@
dstIdx := nativeContext argAt:4.
count := nativeContext argAt:5.
+ dstEndIdx := dstIdx + count.
+ dstIdx := dstIdx + 1. "/ ST uses 1-based indexing
+ srcIdx := srcIdx + 1. "/ ST uses 1-based indexing
+
srcArray class isBytes ifTrue:[
- dstArray class isBytes ifFalse:[
- self halt:'incompatible arraycopy collections'.
- ].
- dstArray replaceBytesFrom:(dstIdx+1) to:(dstIdx+count) with:srcArray startingAt:(srcIdx+1).
+ dstArray class isBytes ifFalse:[
+ self halt:'incompatible arraycopy collections'.
+ ].
+ dstArray replaceBytesFrom:dstIdx to:dstEndIdx with:srcArray startingAt:srcIdx.
] ifFalse:[
- dstArray replaceFrom:(dstIdx+1) to:(dstIdx+count) with:srcArray startingAt:(srcIdx+1).
+ dstArray replaceFrom:dstIdx to:dstEndIdx with:srcArray startingAt:srcIdx.
].
^ nil.
"Created: / 3.1.1998 / 01:56:44 / cg"
- "Modified: / 3.1.1998 / 02:01:37 / cg"
+ "Modified: / 20.10.1998 / 16:22:46 / cg"
!
_System_currentTimeMillis:nativeContext
@@ -8053,6 +8057,6 @@
!JavaVM class methodsFor:'documentation'!
version
- ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaVM.st,v 1.44 1998/10/20 13:11:20 cg Exp $'
+ ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaVM.st,v 1.45 1998/10/20 15:04:31 cg Exp $'
! !
JavaVM initialize!