fix clang warning

This commit is contained in:
rexy712 2020-06-24 03:12:20 -07:00
parent 4778d451d6
commit dfe82a4181

View File

@ -82,10 +82,11 @@ namespace rexy{
}
rexy::string filerd::readln(size_t max)noexcept{
rexy::string ret;
char c;
int c;
size_t count = 0;
for(c = fgetc(m_fp);c != EOF && c != '\n';c = fgetc(m_fp)){
ret.append(&c, 1);
char ch = c;
ret.append(&ch, 1);
if(++count == max)
break;
}