Commit 0591413e authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1402 from mattn/check_home_is_null

Check home is null
parents 9783e9d8 c8f1f7fd
...@@ -286,10 +286,12 @@ main(int argc, char **argv) ...@@ -286,10 +286,12 @@ main(int argc, char **argv)
if (!home) if (!home)
home = getenv("USERPROFILE"); home = getenv("USERPROFILE");
#endif #endif
strcpy(history_path, home); if (home) {
strcat(history_path, "/"); strcpy(history_path, home);
strcat(history_path, history_file_name); strcat(history_path, "/");
read_history(history_path); strcat(history_path, history_file_name);
read_history(history_path);
}
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment