tr: fix "tr [=" case. Closes bug 4374.

function                                             old     new   delta
expand                                              1701    1738     +37
tr_main                                              472     474      +2
This commit is contained in:
Denis Vlasenko 2008-07-28 23:49:42 +00:00
parent 918a34b9e0
commit 043d15da31

View File

@ -135,6 +135,8 @@ static unsigned int expand(const char *arg, char *buffer)
/* "[xyz...", i=x, arg points to y */
if (ENABLE_FEATURE_TR_EQUIV && i == '=') { /* [=CHAR=] */
*buffer++ = *arg; /* copy CHAR */
if (!*arg || arg[1] != '=' || arg[2] != ']')
bb_show_usage();
arg += 3; /* skip CHAR=] */
continue;
}