Skip to content

Commit

Permalink
src: do not compare against wide characters
Browse files Browse the repository at this point in the history
PR-URL: #32921
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
  • Loading branch information
bl-ue authored and BridgeAR committed Apr 28, 2020
1 parent 02653b8 commit 44a5b73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_env_var.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -139,7 +139,7 @@ int32_t RealEnvStore::Query(const char* key) const {
}

#ifdef _WIN32
if (key[0] == L'=') {
if (key[0] == '=') {
return static_cast<int32_t>(v8::ReadOnly) |
static_cast<int32_t>(v8::DontDelete) |
static_cast<int32_t>(v8::DontEnum);
Expand Down

0 comments on commit 44a5b73

Please sign in to comment.