From 5f0f190e88788ffc6993af5a1129b1ea97674e1c Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Fri, 29 May 2009 17:22:23 +0000 Subject: safer fixed offset handling git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@396 f203690c-595d-4dc9-a70b-905162fa7fd2 --- src/java/com/healthmarketscience/jackcess/Table.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/com/healthmarketscience/jackcess/Table.java b/src/java/com/healthmarketscience/jackcess/Table.java index 874f2b0..ecd3edf 100644 --- a/src/java/com/healthmarketscience/jackcess/Table.java +++ b/src/java/com/healthmarketscience/jackcess/Table.java @@ -887,7 +887,8 @@ public class Table buffer.putShort((short) 0); } else { buffer.putShort(fixedOffset); - fixedOffset += col.getType().getFixedSize(); + fixedOffset += Math.max(col.getType().getFixedSize(), + col.getLength()); } if(!col.getType().isLongValue()) { buffer.putShort(col.getLength()); //Column length -- cgit v1.2.3