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

Expand tildes in mnemonics strings that conain non-attr Ctrl-A codes

Fix for issue #800
parent d72b0cd2
No related branches found
No related tags found
No related merge requests found
Pipeline #6890 passed
......@@ -175,7 +175,6 @@ char sbbs_t::getkey(int mode)
/****************************************************************************/
void sbbs_t::mnemonics(const char *instr)
{
const char *ctrl_a_codes;
size_t l;
if(!strchr(instr,'~')) {
......@@ -183,7 +182,7 @@ void sbbs_t::mnemonics(const char *instr)
bputs(instr);
return;
}
ctrl_a_codes=strchr(instr,1);
bool ctrl_a_codes = (strchr(instr, CTRL_A) != NULL) && !contains_invalid_attr(instr);
if(!ctrl_a_codes) {
const char* last = lastchar(instr);
if(instr[0] == '@' && *last == '@' && strchr(instr + 1, '@') == last && strchr(instr, ' ') == NULL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment