return #f if get-environment-variable refers undefined env-var

This commit is contained in:
Yuichi Nishiwaki 2013-10-21 12:03:25 +09:00
parent adab797391
commit 15c4361381
1 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,9 @@ pic_system_getenv(pic_state *pic)
val = getenv(str); val = getenv(str);
if (val == NULL)
return pic_nil_value();
else
return pic_str_new_cstr(pic, val); return pic_str_new_cstr(pic, val);
} }