Merge branch 'CoolerExtreme-patch-1'

This commit is contained in:
Syoyo Fujita
2015-02-18 12:45:42 +09:00

View File

@@ -80,11 +80,10 @@ static inline int fixIndex(int idx, int n) {
static inline std::string parseString(const char *&token) { static inline std::string parseString(const char *&token) {
std::string s; std::string s;
int b = strspn(token, " \t"); token += strspn(token, " \t");
int e = strcspn(token, " \t\r"); int e = strcspn(token, " \t\r");
s = std::string(&token[b], &token[e]); s = std::string(token, &token[e]);
token += e;
token += (e - b);
return s; return s;
} }