diff --git a/shared-module/os/getenv.c b/shared-module/os/getenv.c index 870973c5d2..76cbf48dae 100644 --- a/shared-module/os/getenv.c +++ b/shared-module/os/getenv.c @@ -72,7 +72,7 @@ STATIC void close_file(file_arg *active_file) { // nothing } STATIC bool is_eof(file_arg *active_file) { - return f_eof(active_file); + return f_eof(active_file) || f_error(active_file); } // Return 0 if there is no next character (EOF).