--- a/ByteArray.st Mon May 27 10:14:43 2013 +0200
+++ b/ByteArray.st Mon May 27 10:23:00 2013 +0200
@@ -2441,20 +2441,20 @@
REGISTER unsigned char *p;
unsigned int __i1, __i2;
- int cnt;
+ int sz;
unsigned int t;
if (__qClass(self) == @global(ByteArray) && __bothSmallInteger(i1, i2)) {
- __i1 = __intVal(i1) - 1;
- __i2 = __intVal(i2) - 1;
- cnt = __byteArraySize(self);
- p = __ByteArrayInstPtr(self)->ba_element;
- if (__i1 < cnt && __i2 < cnt) {
- t = p[__i1];
- p[__i1] = p[__i2];
- p[__i2] = t;
- }
- RETURN ( self );
+ __i1 = __intVal(i1) - 1;
+ __i2 = __intVal(i2) - 1;
+ sz = __byteArraySize(self);
+ p = __ByteArrayInstPtr(self)->ba_element;
+ if (__i1 < sz && __i2 < sz) {
+ t = p[__i1];
+ p[__i1] = p[__i2];
+ p[__i2] = t;
+ }
+ RETURN ( self );
}
%}.
^ super swapIndex:i1 and:i2 "/ rubbish - there is no one currently
@@ -3017,10 +3017,10 @@
!ByteArray class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.209 2013-05-27 08:10:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.210 2013-05-27 08:23:00 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.209 2013-05-27 08:10:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.210 2013-05-27 08:23:00 cg Exp $'
! !