X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=misc.c;h=6e3656f50fd90e9144e9f27177fc9a10673391ad;hb=df2830598c85240daa3b2020ca52644803952a0b;hp=0b00992b6e0b1b2342a93258aa7a4db680bcbf41;hpb=df36b62c7436bdec84f29c14b3542cdcdaaa3784;p=open-adventure.git diff --git a/misc.c b/misc.c index 0b00992..6e3656f 100644 --- a/misc.c +++ b/misc.c @@ -190,20 +190,6 @@ void vspeak(const char* msg, bool blank, va_list ap) size -= len; } - // All-lowercase specifier. - if (msg[i] == 'L' || - msg[i] == 'C') { - packed_to_token(arg, renderp); /* unpack directly to destination */ - int len = strlen(renderp); - for (int j = 0; j < len; ++j) { - renderp[j] = tolower(renderp[j]); - } - if (msg[i] == 'C') // First char uppercase, rest lowercase. - renderp[0] = toupper(renderp[0]); - renderp += len; - size -= len; - } - previous_arg = arg; } } @@ -497,6 +483,10 @@ int get_special_vocab_id(const char* word) long get_vocab_id(const char* word) // Search the vocab categories in order for the supplied word. { + /* Check for an empty string */ + if (strncmp(word, "", sizeof("")) == 0) + return (WORD_EMPTY); + long ref_num; /* FIXME: Magic numbers related to vocabulary */