@@ -217,25 +217,25 @@ void IniLoadFile::LoadFromDisk(const std
/* trim whitespace from right side. */
char *e = s + strlen(s);
while (e > s && ((c = e[-1]) == '\n' || c == '\r' || c == ' ' || c == '\t')) e--;
*e = '\0';
/* Skip comments and empty lines outside IGT_SEQUENCE groups. */
if ((group == nullptr || group->type != IGT_SEQUENCE) && (*s == '#' || *s == ';' || *s == '\0')) {
uint ns = comment_size + (e - s + 1);
uint a = comment_alloc;
/* add to comment */
if (ns > a) {
a = max(a, 128U);
a = std::max(a, 128U);
do a *= 2; while (a < ns);
comment = ReallocT(comment, comment_alloc = a);
}
uint pos = comment_size;
comment_size += (e - s + 1);
comment[pos + e - s] = '\n'; // comment newline
memcpy(comment + pos, s, e - s); // copy comment contents
continue;
/* it's a group? */
if (s[0] == '[') {