]> granicus.if.org Git - docbook-dsssl/commitdiff
Make sure the width[] array returned is always exactly the right length
authorNorman Walsh <ndw@nwalsh.com>
Fri, 15 Nov 2002 13:49:42 +0000 (13:49 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Fri, 15 Nov 2002 13:49:42 +0000 (13:49 +0000)
xsl/extensions/saxon643/com/nwalsh/saxon/ColumnScanEmitter.java

index 0b96f8bed1a4e2b3ebf2c08fd5c4bf60ed9600aa..9c3ab88c2fa5816c521c9f5ff020404d4c241569 100644 (file)
@@ -58,7 +58,12 @@ public class ColumnScanEmitter extends com.icl.saxon.output.Emitter {
 
   /** Return the number of columns. */
   public String[] columnWidths() {
-    return width;
+    // Return a width array with exactly the right number of columns
+    String rWidth[] = new String[numColumns];
+    for (int count = 0; count < numColumns; count++) {
+      rWidth[count] = width[count];
+    }
+    return rWidth;
   }
 
   /** Discarded. */