mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[11725] Fixed chat command parse with explicit literal check.
Before fix ExtractLiteralArg(str,"abc") reject "ab" string wrongly.
This commit is contained in:
parent
4ec136222a
commit
1221a60d57
2 changed files with 9 additions and 1 deletions
|
|
@ -2316,6 +2316,14 @@ char* ChatHandler::ExtractLiteralArg(char** args, char const* lit /*= NULL*/)
|
|||
if (lit)
|
||||
{
|
||||
int l = strlen(lit);
|
||||
|
||||
int largs = 0;
|
||||
while(head[largs] && !isWhiteSpace(head[largs]))
|
||||
++largs;
|
||||
|
||||
if (largs < l)
|
||||
l = largs;
|
||||
|
||||
int diff = strncmp(head, lit, l);
|
||||
|
||||
if (diff != 0)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11724"
|
||||
#define REVISION_NR "11725"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue