]> source.dussan.org Git - poi.git/commitdiff
should have been part of c723161 (re-arranging methods getRecordSize and getDataSize...
authorJosh Micich <josh@apache.org>
Thu, 4 Dec 2008 00:15:54 +0000 (00:15 +0000)
committerJosh Micich <josh@apache.org>
Thu, 4 Dec 2008 00:15:54 +0000 (00:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@723164 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/record/ObjRecord.java

index 1141134947947973f65f67dc6748e6f7e1812c0f..6f4a651cc84912c73d661ce44b6f1af39b0579f3 100644 (file)
@@ -141,8 +141,8 @@ public final class ObjRecord extends Record {
        }
 
        public int serialize(int offset, byte[] data) {
-               int dataSize = getDataSize();
-               int recSize = 4 + dataSize;
+               int recSize = getRecordSize();
+               int dataSize = recSize - 4;
                LittleEndianByteArrayOutputStream out = new LittleEndianByteArrayOutputStream(data, offset, recSize);
 
                out.writeShort(sid);