summaryrefslogtreecommitdiffstats
path: root/win32
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-27 11:28:18 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-27 11:28:18 +0000
commit31485182f8e337a5b214d29ff3184542791c34db (patch)
treef7046d5c2ce0f3a301fb64b0cb5e7cdabf175f81 /win32
parente119eabf1bbe3b0524a5a6db88b680b3aa95211c (diff)
downloadruby-31485182f8e337a5b214d29ff3184542791c34db.tar.gz
ruby-31485182f8e337a5b214d29ff3184542791c34db.tar.xz
ruby-31485182f8e337a5b214d29ff3184542791c34db.zip
* win32/win32.c (rb_w32_argv_size): if an argument is empty, it's size
is 2, not 0, because it will be converted to "". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index d346a925d..316b69b87 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -715,7 +715,7 @@ rb_w32_argv_size(char *const *argv)
}
}
len += p - *t + n + 1;
- if (quote) len += 2;
+ if (p - *t == 0 || quote) len += 2;
}
return len;
}