Index: trunk/stac/src/stacRead.c
===================================================================
--- trunk/stac/src/stacRead.c	(revision 8783)
+++ trunk/stac/src/stacRead.c	(revision 9740)
@@ -17,9 +17,7 @@
     int nFiles = filenames->n;          // The number of input files
     psArray *images = psArrayAlloc(nFiles); // The input files, to be returned
-    images->n = nFiles;
     assert(!headers || ! *headers || (*headers)->n == nFiles);
     if (headers && ! *headers) {
         *headers = psArrayAlloc(nFiles);
-        (*headers)->n = nFiles;
     }
 
@@ -75,5 +73,5 @@
     psTrace("stac.read.coords", 5, "Reading coordinate file, %s\n", filename);
 
-    psArray *coords = psArrayAlloc(BUFFER); // The array of coordinates to be returned
+    psArray *coords = psArrayAllocEmpty(BUFFER); // The array of coordinates to be returned
     float x, y;                         // Coordinates to read
     while (fscanf(file, "%f %f\n", &x, &y) == 2) {
@@ -188,5 +186,4 @@
     int nFiles = filenames->n;          // The number of input files
     psArray *maps = psArrayAlloc(nFiles); // The maps, to be returned
-    maps->n = nFiles;
     char mapfile[MAXCHAR];              // Filename of map
 
