mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #1402 from mattn/check_home_is_null
Check home is null
This commit is contained in:
@@ -286,10 +286,12 @@ main(int argc, char **argv)
|
||||
if (!home)
|
||||
home = getenv("USERPROFILE");
|
||||
#endif
|
||||
strcpy(history_path, home);
|
||||
strcat(history_path, "/");
|
||||
strcat(history_path, history_file_name);
|
||||
read_history(history_path);
|
||||
if (home) {
|
||||
strcpy(history_path, home);
|
||||
strcat(history_path, "/");
|
||||
strcat(history_path, history_file_name);
|
||||
read_history(history_path);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user