1
0
mirror of https://github.com/benhoyt/inih.git synced 2025-02-05 07:08:23 +08:00

swap rstrip and lskip to reduce execution time of strlen() (#177)

This commit is contained in:
Isidro 2024-10-20 15:14:44 +02:00 committed by GitHub
parent ed4525140d
commit cd5f939740
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

2
ini.c
View File

@ -164,7 +164,7 @@ int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler,
start += 3;
}
#endif
start = ini_lskip(ini_rstrip(start));
start = ini_rstrip(ini_lskip(start));
if (strchr(INI_START_COMMENT_PREFIXES, *start)) {
/* Start-of-line comment */