pic->envp is nullable

This commit is contained in:
Yuichi Nishiwaki 2014-02-13 15:37:15 +09:00
parent 64cdd5f152
commit 95fae80658
1 changed files with 4 additions and 0 deletions

View File

@ -103,6 +103,10 @@ pic_system_getenvs(pic_state *pic)
pic_get_args(pic, "");
if (! pic->envp) {
return pic_nil_value();
}
for (envp = pic->envp; *envp; ++envp) {
pic_value key, val;
int i;