Skip to content

Commit

Permalink
wasi: env initialization fix (#262)
Browse files Browse the repository at this point in the history
Signed-off-by: tim <tim@pims.me>
Co-authored-by: Crypt Keeper <64215+codefromthecrypt@users.noreply.github.com>
  • Loading branch information
pims and codefromthecrypt authored Feb 18, 2022
1 parent 3d25f48 commit 16f35f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wasi.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func WASISnapshotPreview1WithConfig(c *WASIConfig) *HostFunctions {
opts = append(opts, opt)
}
if len(c.Environ) > 0 {
environ := make([]string, len(c.Environ))
environ := make([]string, 0, len(c.Environ))
for k, v := range c.Environ {
environ = append(environ, fmt.Sprintf("%s=%s", k, v))
}
Expand Down

0 comments on commit 16f35f0

Please sign in to comment.