[Commit] nickle ChangeLog,1.25,1.26 builtin-toplevel.c,1.21,1.22

Keith Packard commit at keithp.com
Sat Apr 10 23:27:13 PDT 2004


Committed by: keithp

Update of /local/src/CVS/nickle
In directory home.keithp.com:/tmp/cvs-serv13016

Modified Files:
	ChangeLog builtin-toplevel.c 
Log Message:
2004-04-10  Keith Packard  <keithp at keithp.com>

	* builtin-toplevel.c: (do_setdims):
	setdims arguments need to be inverted to match array
	dimension order for ArrayResize.


Index: ChangeLog
===================================================================
RCS file: /local/src/CVS/nickle/ChangeLog,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- a/ChangeLog	11 Apr 2004 06:20:34 -0000	1.25
+++ b/ChangeLog	11 Apr 2004 06:27:11 -0000	1.26
@@ -1,5 +1,11 @@
 2004-04-10  Keith Packard  <keithp at keithp.com>
 
+	* builtin-toplevel.c: (do_setdims):
+	setdims arguments need to be inverted to match array
+	dimension order for ArrayResize.
+
+2004-04-10  Keith Packard  <keithp at keithp.com>
+
 	* box.c: (BoxRewrite):
 	Ugh.  Array shrink causes problems with references to
 	elements now outside the box boundaries.  "real" fix

Index: builtin-toplevel.c
===================================================================
RCS file: /local/src/CVS/nickle/builtin-toplevel.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- a/builtin-toplevel.c	11 Apr 2004 06:06:51 -0000	1.21
+++ b/builtin-toplevel.c	11 Apr 2004 06:27:11 -0000	1.22
@@ -365,14 +365,15 @@
     }
     for (i = 0; i < a->ndim; i++)
     {
-	dims[i] = IntPart (BoxValueGet (db,i), "setdims: invalid dimension");
+	int j = a->ndim - 1 - i;
+	dims[j] = IntPart (BoxValueGet (db,i), "setdims: invalid dimension");
 	if (aborting)
 	    RETURN (Void);
-	if (dims[i] < 0)
+	if (dims[j] < 0)
 	{
 	    RaiseStandardException (exception_invalid_argument,
 				    "setdims: dimensions must be non-negative",
-				    2, NewInt (i), NewInt (dims[i]));
+				    2, NewInt (i), NewInt (dims[j]));
 	    RETURN (Void);
 	}
     }




More information about the Commit mailing list