summaryrefslogtreecommitdiff
path: root/packages/u-boot/u-boot-1.1.4/u-boot-autoscript.patch
blob: 1864b4494ea8f821e59b1df6b5d8fffe0daec615 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- u-boot-1.1.2/common/cmd_autoscript.c
+++ u-boot-1.1.2/common/cmd_autoscript.c
@@ -110,8 +110,8 @@
 		return 1;
 	}
 
-	while (*len_ptr++);
+	do { len_ptr++; } while (!(*len_ptr));
 
 	/* make sure cmd is null terminated */
 	memmove (cmd, (char *)len_ptr, len);
 	*(cmd + len) = 0;