File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ Local<Array> RealEnvStore::Enumerate(Isolate* isolate) const {
153
153
CHECK_EQ (uv_os_environ (&items, &count), 0 );
154
154
155
155
MaybeStackBuffer<Local<Value>, 256 > env_v (count);
156
+ int env_v_index = 0 ;
156
157
for (int i = 0 ; i < count; i++) {
157
158
#ifdef _WIN32
158
159
// If the key starts with '=' it is a hidden environment variable.
@@ -166,10 +167,10 @@ Local<Array> RealEnvStore::Enumerate(Isolate* isolate) const {
166
167
isolate->ThrowException (ERR_STRING_TOO_LONG (isolate));
167
168
return Local<Array>();
168
169
}
169
- env_v[i ] = str.ToLocalChecked ();
170
+ env_v[env_v_index++ ] = str.ToLocalChecked ();
170
171
}
171
172
172
- return Array::New (isolate, env_v.out (), env_v. length () );
173
+ return Array::New (isolate, env_v.out (), env_v_index );
173
174
}
174
175
175
176
std::shared_ptr<KVStore> KVStore::Clone (v8::Isolate* isolate) const {
You can’t perform that action at this time.
0 commit comments