Commit 62880f22 authored by rswindell's avatar rswindell
Browse files

If ^A~or ^A` is followed by a ctrl charcter, don't treat as a hot-spot. This...

If ^A~or ^A` is followed by a ctrl charcter, don't treat as a hot-spot. This helps to insure that if there are any .asc/.msg files "in the wild" that have a sequence of ^A`^AL (home-cursor, clear-screen), they'll still render as before
the introduction fo the strict hot-spot ^A` sequence.
parent 0d06d771
......@@ -92,12 +92,12 @@ int sbbs_t::bputs(const char *str, long mode)
l++;
if(str[l] == 'Z') /* EOF (uppercase 'Z' only) */
break;
if(str[l] == '~' && str[l + 1] != '\0') { // Mouse hot-spot (hungry)
if(str[l] == '~' && str[l + 1] >= ' ') { // Mouse hot-spot (hungry)
l++;
add_hotspot(str[l], /* hungry */true);
continue;
}
if(str[l] == '`' && str[l + 1] != '\0') { // Mouse hot-spot (strict)
if(str[l] == '`' && str[l + 1] >= ' ') { // Mouse hot-spot (strict)
l++;
add_hotspot(str[l], /* hungry */false);
continue;
......
......@@ -148,11 +148,11 @@ char sbbs_t::putmsg(const char *buf, long mode, long org_cols, JSObject* obj)
}
else if(str[l+1] == 'Z') /* Ctrl-AZ==EOF (uppercase 'Z' only) */
break;
else if(str[l + 1] == '~' && str[l + 2] != '\0') {
else if(str[l + 1] == '~' && str[l + 2] >= ' ') {
add_hotspot(str[l + 2], /* hungry: */true);
l += 2;
}
else if(str[l + 1] == '`' && str[l + 2] != '\0') {
else if(str[l + 1] == '`' && str[l + 2] >= ' ') {
add_hotspot(str[l + 2], /* hungry: */false);
l += 2;
}
......
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