From 23eda417b66a671ad9c50378c9063345e69794ee Mon Sep 17 00:00:00 2001 From: Christopher Beeson Date: Sun, 19 Apr 2020 12:48:12 -0400 Subject: [PATCH] src: do not compare against wide characters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/32921 Reviewed-By: Ben Noordhuis Reviewed-By: David Carlier Reviewed-By: James M Snell Reviewed-By: Franziska Hinkelmann Reviewed-By: Zeyu Yang Reviewed-By: Anna Henningsen Reviewed-By: Juan José Arboleda --- src/node_env_var.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_env_var.cc b/src/node_env_var.cc index 8fed12367f84b7..8eaf79538a26e7 100644 --- a/src/node_env_var.cc +++ b/src/node_env_var.cc @@ -121,7 +121,7 @@ void RealEnvStore::Set(Isolate* isolate, node::Utf8Value val(isolate, value); #ifdef _WIN32 - if (key.length() > 0 && key[0] == L'=') return; + if (key.length() > 0 && key[0] == '=') return; #endif uv_os_setenv(*key, *val); DateTimeConfigurationChangeNotification(isolate, key); @@ -139,7 +139,7 @@ int32_t RealEnvStore::Query(const char* key) const { } #ifdef _WIN32 - if (key[0] == L'=') { + if (key[0] == '=') { return static_cast(v8::ReadOnly) | static_cast(v8::DontDelete) | static_cast(v8::DontEnum);