From: Ari Johnson Date: Wed, 21 Feb 2007 04:47:48 +0000 (+0000) Subject: A percent sign followed by a space or placed at the end of the line will be parsed... X-Git-Tag: 0.73~142 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=fdb7d560ac0e7cf6d8288f67d480bcb12ea98a65;p=cobramush.git A percent sign followed by a space or placed at the end of the line will be parsed to itself --- diff --git a/src/parse.c b/src/parse.c index f99957e..ea20044 100644 --- a/src/parse.c +++ b/src/parse.c @@ -716,8 +716,11 @@ process_expression(char *buff, char **bp, char const **str, (*str)++; savec = **str; - if (!savec) + if (!savec) { + /* Line ended in %, so treat it as a literal */ + safe_chr('%', buff, bp); goto exit_sequence; + } savepos = *bp; (*str)++; @@ -725,6 +728,9 @@ process_expression(char *buff, char **bp, char const **str, case '%': /* %% - a real % */ safe_chr('%', buff, bp); break; + case ' ': /* "% " for more natural typing */ + safe_str("% ", buff, bp); + break; case '!': /* executor dbref */ safe_dbref(executor, buff, bp); break;