Fix token recognition in macro parser
This commit is contained in:
parent
497bf8d0c9
commit
8ddffc9987
@ -752,11 +752,11 @@ void DoTearorig(int mode, GMsg* msg) {
|
||||
strbtrim(msg->tagline);
|
||||
}
|
||||
|
||||
TokenXlat(mode, msg->tearline, sizeof(msg->tearline), msg, msg, CurrArea);
|
||||
TokenXlat(mode, msg->tearline, sizeof(msg->tearline), msg, msg, CurrArea); // tearline translation one point
|
||||
|
||||
ctrlinfo = AA->Ctrlinfo();
|
||||
|
||||
if(not *msg->origin)
|
||||
if(not *msg->origin) // Strange... Origin is created here, but deleted in in next block. To be fixed?
|
||||
MakeOrigin(msg, origin.c_str());
|
||||
|
||||
// Delete current tag-, tear- and originlines
|
||||
@ -801,7 +801,7 @@ void DoTearorig(int mode, GMsg* msg) {
|
||||
MakeOrigin(msg, origin.c_str());
|
||||
|
||||
TokenXlat(mode, msg->tagline, sizeof(msg->tagline), msg, msg, CurrArea);
|
||||
TokenXlat(mode, msg->tearline, sizeof(msg->tearline), msg, msg, CurrArea);
|
||||
TokenXlat(mode, msg->tearline, sizeof(msg->tearline), msg, msg, CurrArea); // tearline translation two point
|
||||
TokenXlat(mode, msg->origin, sizeof(msg->origin), msg, msg, CurrArea);
|
||||
|
||||
// Add the tagline, tearline and origin as defined
|
||||
|
@ -48,8 +48,9 @@ static bool tokenxchg(std::string &input, std::string::iterator &pos,
|
||||
size_t len = 0, size_t cnt = 0, ...)
|
||||
{
|
||||
size_t toklen = strlen(tok);
|
||||
const char* inp_str_tok=it2str(input, pos);
|
||||
|
||||
if (strnieql(it2str(input, pos), tok, toklen))
|
||||
if ( (strnieql(inp_str_tok, tok, toklen)) && isspace(inp_str_tok[toklen]) )
|
||||
{
|
||||
std::string str = src;
|
||||
std::string::iterator tokend = pos+toklen;
|
||||
|
Reference in New Issue
Block a user