OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-link-grammar commits / 1a4775a

Bug fix pointer clobber
1a4775aefcdf609c4ad1f7f7b9150454eb7a3836
by Linas Vepštas <linasvepstas@gmail.com> · 2024-05-30T17:34:26.000Z

Changed files (1) +3 -4

link-parser/lg_readline.c +3 -4
……@@ -74,18 +74,17 @@ void find_history_filepath(const char *dictname, const char *argv0,
7474 dictpref[strcspn(dictpref, ":")] = '\0';
7575
7676 // Find the location of the history file.
77 const char *hfile = xdg_make_path(XDG_BD_STATE, "%s/%s%s", xdg_prog,
78 dictpref, history_file_basename);
77 history_file = xdg_make_path(XDG_BD_STATE, "%s/%s%s", xdg_prog,
78 dictpref, history_file_basename);
7979 free(dictpref);
8080
81 if (NULL == hfile)
81 if (NULL == history_file)
8282 {
8383 prt_error("Warning: xdg_get_home(XDG_BD_STATE) failed; "
8484 "input history will not be supported.\n");
8585 history_file = strdup("dev/null");
8686 }
8787
88 history_file = hfile;
8988 if (get_verbosity() == D_USER_FILES)
9089 prt_error("Debug: Using history file \"%s\"\n", history_file);
9190}