]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.2 patch 35
authorChet Ramey <chet.ramey@case.edu>
Tue, 10 Jul 2012 13:44:43 +0000 (09:44 -0400)
committerChet Ramey <chet.ramey@case.edu>
Tue, 10 Jul 2012 13:44:43 +0000 (09:44 -0400)
builtins/mapfile.def
patchlevel.h

index ec1e32e5d049a4d1d4772825c91dedd776fdb752..a5064a3a2d9d59e7386a17a7aa410382b6969830 100644 (file)
@@ -195,13 +195,9 @@ mapfile (fd, line_count_goal, origin, nskip, callback_quantum, callback, array_n
   /* Reset the buffer for bash own stream */
   interrupt_immediately++;
   for (array_index = origin, line_count = 1; 
-       zgetline (fd, &line, &line_length, unbuffered_read) != -1;
-       array_index++, line_count++
+       zgetline (fd, &line, &line_length, unbuffered_read) != -1;
+       array_index++) 
     {
-      /* Have we exceeded # of lines to store? */
-      if (line_count_goal != 0 && line_count > line_count_goal) 
-       break;
-
       /* Remove trailing newlines? */
       if (flags & MAPF_CHOP)
        do_chop (line);
@@ -217,6 +213,11 @@ mapfile (fd, line_count_goal, origin, nskip, callback_quantum, callback, array_n
        }
 
       bind_array_element (entry, array_index, line, 0);
+
+      /* Have we exceeded # of lines to store? */
+      line_count++;
+      if (line_count_goal != 0 && line_count > line_count_goal) 
+       break;
     }
 
   xfree (line);
index a8cac1066f13073977af3e1953d5a3b06f408d68..1af8e56221334d6372869e5a95faba93b7bed619 100644 (file)
@@ -25,6 +25,6 @@
    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 34
+#define PATCHLEVEL 35
 
 #endif /* _PATCHLEVEL_H_ */