Merge pull request #1402 from mattn/check_home_is_null

Check home is null
This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-07-23 05:45:33 -07:00
+6 -4
View File
@@ -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