SHA1Stream.st
changeset 16004 3d3da3b792a1
parent 15998 4307e39fc342
child 16009 94ef574411dc
--- a/SHA1Stream.st	Wed Feb 12 15:37:56 2014 +0100
+++ b/SHA1Stream.st	Wed Feb 12 15:38:02 2014 +0100
@@ -549,7 +549,7 @@
             OBJ oClass = __Class(anObject);
             int nInstVars = __intVal(__ClassInstPtr(oClass)->c_ninstvars);
 
-            nInstBytes = __OBJS2BYTES__(nInstVars);
+            nInstBytes = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
             switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) {
                 case BYTEARRAY:
                 case WORDARRAY:
@@ -574,7 +574,7 @@
             }
             // nInstBytes is the number of bytes occupied by pointer instance variables
             // subtract from size and add to byte-pointer
-            objSize = __Size(anObject) - OHDR_SIZE - nInstBytes;
+            objSize = __Size(anObject) - nInstBytes;
             extPtr = (char *)__byteArrayVal(anObject)+nInstBytes;
         }
         if ((offs >= 0) && (len >= 0) && (objSize >= (len + offs))) {
@@ -591,11 +591,11 @@
 !SHA1Stream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SHA1Stream.st,v 1.43 2014-02-12 14:31:21 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SHA1Stream.st,v 1.44 2014-02-12 14:38:02 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/SHA1Stream.st,v 1.43 2014-02-12 14:31:21 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SHA1Stream.st,v 1.44 2014-02-12 14:38:02 stefan Exp $'
 ! !