diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-11 10:14:18 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-11 10:14:18 +0800 |
commit | 02fa211cd301928b075083bf457e02daed462f1b (patch) | |
tree | 0326fbd697a944aee0a1a6b4c4fb810b32544ee5 | |
parent | 2bd18f5eb61f0ad52763026d4d1278e7592ecd9c (diff) | |
download | pttbbs-02fa211cd301928b075083bf457e02daed462f1b.tar pttbbs-02fa211cd301928b075083bf457e02daed462f1b.tar.gz pttbbs-02fa211cd301928b075083bf457e02daed462f1b.tar.bz2 pttbbs-02fa211cd301928b075083bf457e02daed462f1b.tar.lz pttbbs-02fa211cd301928b075083bf457e02daed462f1b.tar.xz pttbbs-02fa211cd301928b075083bf457e02daed462f1b.tar.zst pttbbs-02fa211cd301928b075083bf457e02daed462f1b.zip |
(internal) code refine on escape star variables expanding
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4130 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/kaede.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/mbbsd/kaede.c b/mbbsd/kaede.c index fa591aad..e2f99758 100644 --- a/mbbsd/kaede.c +++ b/mbbsd/kaede.c @@ -7,19 +7,9 @@ int expand_esc_star(char *buf, const char *src, int szbuf) { - if (*src != ESC_CHR) - { - strlcpy(buf, src, szbuf); - return 0; - } - - if (*++src != '*') // unknown escape... strip the ESC. - { - strlcpy(buf, src, szbuf); - return 0; - } - - switch(*++src) + assert(*src == KEY_ESC && *(src+1) == '*'); + src += 2; + switch(*src) { // // secure content |