From e46cbaa06d6f69ae37c56d9ed1b854fbea779e30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 17 Oct 2014 09:31:59 +0200 Subject: [PATCH] core: fix usage of uv_cwd It was modified in libuv to be consistent with uv_exepath and not include the trailing NULL byte in the returned size. PR-URL: https://github.com/joyent/node/pull/8566 Reviewed-by: Fedor Indutny Reviewed-by: Trevor Norris --- src/node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index db22ea9..532f902 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1636,7 +1636,7 @@ static void Cwd(const FunctionCallbackInfo& args) { Local cwd = String::NewFromUtf8(env->isolate(), buf, String::kNormalString, - cwd_len - 1); + cwd_len); args.GetReturnValue().Set(cwd); } -- 2.7.4