Skip to content
Snippets Groups Projects
Commit 8506c2b6 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix bug in random_menu() introduce in previous commit

Broke random menu/display files - we needed another temp variable here.
parent 8d763577
No related branches found
No related tags found
No related merge requests found
...@@ -409,9 +409,10 @@ bool sbbs_t::random_menu(const char *name, int mode, JSObject* obj) ...@@ -409,9 +409,10 @@ bool sbbs_t::random_menu(const char *name, int mode, JSObject* obj)
SAFEPRINTF2(path, "%smenu/%s", cfg.text_dir, name); SAFEPRINTF2(path, "%smenu/%s", cfg.text_dir, name);
if (cfg.mods_dir[0] != '\0') { if (cfg.mods_dir[0] != '\0') {
char modpath[MAX_PATH + 1]; char modpath[MAX_PATH + 1];
char tmppath[MAX_PATH + 1];
SAFEPRINTF2(modpath, "%stext/menu/%s", cfg.mods_dir, name); SAFEPRINTF2(modpath, "%stext/menu/%s", cfg.mods_dir, name);
FULLPATH(path, modpath, sizeof path); FULLPATH(tmppath, modpath, sizeof tmppath);
SAFECOPY(modpath, path); SAFECOPY(modpath, tmppath);
if (fexist(modpath)) if (fexist(modpath))
SAFECOPY(path, modpath); SAFECOPY(path, modpath);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment