* src/psaux/psobjs.c (ps_tofixedarray, ps_tocoordarray): Fix exit
logic.
(ps_parser_load_field) <T1_FIELD_TYPE_BBOX>: Skip delimiters
correctly.
(ps_parser_load_field_table): Use `fields->array_max' instead of
T1_MAX_TABLE_ELEMENTS to limit the number of arguments.
diff --git a/ChangeLog b/ChangeLog
index 2167395..b21cb8d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-06-18  Werner Lemberg  <wl@gnu.org>
+
+	* src/psaux/psobjs.c (ps_tofixedarray, ps_tocoordarray): Fix exit
+	logic.
+	(ps_parser_load_field) <T1_FIELD_TYPE_BBOX>: Skip delimiters
+	correctly.
+	(ps_parser_load_field_table): Use `fields->array_max' instead of
+	T1_MAX_TABLE_ELEMENTS to limit the number of arguments.
+
 2006-06-17  Werner Lemberg  <wl@gnu.org>
 
 	* src/tools/ftrandom.c (font_size): New global variable.
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 8217fb9..0ea81cd 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -803,9 +803,6 @@
       if ( cur >= limit )
         goto Exit;
 
-      if ( coords != NULL && count >= max_coords )
-        break;
-
       if ( *cur == ender )
       {
         cur++;
@@ -814,6 +811,9 @@
 
       old_cur = cur;
 
+      if ( coords != NULL && count >= max_coords )
+        break;
+
       /* call PS_Conv_ToFixed() even if coords == NULL */
       /* to properly parse number at `cur'             */
       *( coords != NULL ? &coords[count] : &dummy ) =
@@ -881,9 +881,6 @@
       if ( cur >= limit )
         goto Exit;
 
-      if ( values != NULL && count >= max_values )
-        break;
-
       if ( *cur == ender )
       {
         cur++;
@@ -892,6 +889,9 @@
 
       old_cur = cur;
 
+      if ( values != NULL && count >= max_values )
+        break;
+
       /* call PS_Conv_ToFixed() even if coords == NULL */
       /* to properly parse number at `cur'             */
       *( values != NULL ? &values[count] : &dummy ) =
@@ -1182,7 +1182,7 @@
           FT_Int    result;
 
 
-          result = ps_tofixedarray( &token.start, token.limit, 4, temp, 0 );
+          result = ps_tofixedarray( &cur, limit, 4, temp, 0 );
 
           if ( result < 0 )
           {
@@ -1254,8 +1254,8 @@
       error = PSaux_Err_Ignore;
       goto Exit;
     }
-    if ( num_elements > T1_MAX_TABLE_ELEMENTS )
-      num_elements = T1_MAX_TABLE_ELEMENTS;
+    if ( (FT_UInt)num_elements > field->array_max )
+      num_elements = field->array_max;
 
     old_cursor = parser->cursor;
     old_limit  = parser->limit;