diff --git a/VERSIONS b/VERSIONS index 9602ccf..94ef6e6 100644 --- a/VERSIONS +++ b/VERSIONS @@ -1,5 +1,6 @@ 3.1 -- WORK IN PROGRESS (~May, 2018) + * Fixed: Bug with bigsay characters defined with blank lines. * Changed: Session config is saved to "filename.sessiontemp" and once the save is complete its moved to "filename.session", just in case something happens that might create a corrupt session file (eg, SIGSEGV). diff --git a/common/default.bigchars b/common/default.bigchars index a89033c..d4e1d6d 100644 --- a/common/default.bigchars +++ b/common/default.bigchars @@ -14,12 +14,12 @@ chars ! \__/ chars . - - - - - - +-blank- +-blank- +-blank- +-blank- +-blank- +-blank- ,--, \__/ @@ -34,11 +34,11 @@ chars | `--' chars : - +-blank- ,--. | | `--' - +-blank- ,--. | | `--' diff --git a/common/spider.bigchars b/common/spider.bigchars index 82bdd52..a16332c 100644 --- a/common/spider.bigchars +++ b/common/spider.bigchars @@ -7,15 +7,14 @@ chars ! | | | - +-blank- o chars . - - - - - +-blank- +-blank- +-blank- +-blank- o chars | @@ -26,11 +25,11 @@ chars | | chars : - +-blank- o - +-blank- o - +-blank- chars aA ,-. diff --git a/src/toybox.c b/src/toybox.c index 0767802..8b92fff 100644 --- a/src/toybox.c +++ b/src/toybox.c @@ -77,9 +77,14 @@ int read_bigcharset_callback(char *rest) if (charlines) { charlines--; - sz = strlen(rest); - if (sz > newchar->width) - newchar->width = sz; + if (stringcmp("-blank-",rest) == 0) + rest = ""; + else + { + sz = strlen(rest); + if (sz > newchar->width) + newchar->width = sz; + } append_strp(&newchar->data,rest); return(FALSE); } @@ -92,6 +97,9 @@ int read_bigcharset_callback(char *rest) charlines = charheight; opt = chop(&rest); +#ifdef DEBUG + debug("(read_bigcharset_callback) New character definition: %s\n",opt); +#endif /* DEBUG */ set_mallocdoer(read_bigcharset_callback); newchar = (BigC*)Calloc(sizeof(BigC) + strlen(opt)); @@ -783,6 +791,12 @@ reuse_font: break; } } +#ifdef DEBUG + if (bigc == NULL) + { + debug("(do_bigsay) no matching character found for '%c'\n",*pt); + } +#endif /* DEBUG */ } temp = NULL; for(tail=output;*tail;tail++)