parent
1469b82aa2
commit
0064b01ae0
@ -340,7 +340,7 @@ void file_readline(bool trim, const char *file, const function<bool(string_view)
|
|||||||
while ((read = getline(&buf, &len, fp)) >= 0) {
|
while ((read = getline(&buf, &len, fp)) >= 0) {
|
||||||
start = buf;
|
start = buf;
|
||||||
if (trim) {
|
if (trim) {
|
||||||
while (read && (buf[read - 1] == '\n' || buf[read - 1] == ' '))
|
while (read && "\n\r "sv.find(buf[read - 1]) != string::npos)
|
||||||
--read;
|
--read;
|
||||||
buf[read] = '\0';
|
buf[read] = '\0';
|
||||||
while (*start == ' ')
|
while (*start == ' ')
|
||||||
|
Loading…
Reference in New Issue
Block a user