mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 20:51:29 +00:00
Merge pull request #582 from SCMcLaughlin/master
Additional LS config parser fixes:
This commit is contained in:
commit
427fb08561
@ -144,7 +144,7 @@ void Config::Parse(const char *file_name)
|
|||||||
*/
|
*/
|
||||||
void Config::Tokenize(FILE *input, std::list<std::string> &tokens)
|
void Config::Tokenize(FILE *input, std::list<std::string> &tokens)
|
||||||
{
|
{
|
||||||
int c = fgetc(input);
|
auto c = fgetc(input);
|
||||||
std::string lexeme;
|
std::string lexeme;
|
||||||
|
|
||||||
while(c != EOF)
|
while(c != EOF)
|
||||||
@ -162,7 +162,7 @@ void Config::Tokenize(FILE *input, std::list<std::string> &tokens)
|
|||||||
|
|
||||||
if(isalnum(c))
|
if(isalnum(c))
|
||||||
{
|
{
|
||||||
lexeme.append((const char *)&c, 1);
|
lexeme += c;
|
||||||
c = fgetc(input);
|
c = fgetc(input);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -193,14 +193,14 @@ void Config::Tokenize(FILE *input, std::list<std::string> &tokens)
|
|||||||
lexeme.clear();
|
lexeme.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
lexeme.append((const char *)&c, 1);
|
lexeme += c;
|
||||||
tokens.push_back(lexeme);
|
tokens.push_back(lexeme);
|
||||||
lexeme.clear();
|
lexeme.clear();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
lexeme.append((const char *)&c, 1);
|
lexeme += c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user