From 79deabdfb47409f31d0f6ea044b92e8eac09cec2 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Wed, 14 Apr 2010 00:33:30 +0200 Subject: win32: ash: path_advance(): save space for .exe later MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy --- shell/ash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index db27cefe5..8df1a4062 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -2274,7 +2274,9 @@ path_advance(const char **path, const char *name) continue; #endif len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */ - while (stackblocksize() < len) + + /* preserve space for .exe too */ + while (stackblocksize() < (ENABLE_PLATFORM_MINGW32 ? len+4 : len)) growstackblock(); q = stackblock(); if (p != start) { -- cgit v1.2.3-55-g6feb