This commit is contained in:
Learath 2019-03-11 14:54:31 +03:00
parent 9713f6c2cd
commit f6c15f1de0
2 changed files with 3 additions and 3 deletions

View file

@ -1209,7 +1209,7 @@ void CServerBrowser::DDNetFilterRem(char *pFilter, const char *pName)
pFilter[0] = '\0';
char aToken[128];
for(const char *tok = aBuf; (tok = str_next_token(tok, ",", aToken, sizeof (aToken)));)
for(const char *tok = aBuf; (tok = str_next_token(tok, ",", aToken, sizeof(aToken)));)
{
if(str_comp_nocase(pName, aToken) != 0)
{

View file

@ -143,11 +143,11 @@ TEST(Str, Tokenize)
char aBuf[4];
int n = 0;
for(const char *tok = aTest; (tok = str_next_token(tok, ",", aBuf, sizeof aBuf));)
for(const char *tok = aTest; (tok = str_next_token(tok, ",", aBuf, sizeof(aBuf)));)
EXPECT_STREQ(aOut[n++], aBuf);
char aTest2[] = "";
EXPECT_EQ(str_next_token(aTest2, ",", aBuf, sizeof aBuf), nullptr);
EXPECT_EQ(str_next_token(aTest2, ",", aBuf, sizeof(aBuf)), nullptr);
}
TEST(Str, InList)