diff src/misc1.c @ 5275:3ddec3d25bd1 v7.4b.014

updated for version 7.4b.014 Problem: Stupid mistake. Solution: Changle "len" to "i".
author Bram Moolenaar <bram@vim.org>
date Sat, 03 Aug 2013 17:31:28 +0200
parents 25f67b62afd8
children 965044860b7f
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -10890,8 +10890,8 @@ get_cmd_output(cmd, infile, flags)
     {
 	/* Change NUL into SOH, otherwise the string is truncated. */
 	for (i = 0; i < len; ++i)
-	    if (buffer[len] == NUL)
-		buffer[len] = 1;
+	    if (buffer[i] == NUL)
+		buffer[i] = 1;
 
 	buffer[len] = NUL;	/* make sure the buffer is terminated */
     }