Correctly handle CRLF line endings in config parser
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in 37s
Builds / ExectOS (amd64, release) (push) Successful in 36s
Builds / ExectOS (i686, debug) (push) Successful in 36s
Builds / ExectOS (i686, release) (push) Successful in 34s

This commit is contained in:
2025-09-26 17:36:12 +02:00
parent 4696faf86d
commit 370a635ee2

View File

@@ -622,7 +622,7 @@ Configuration::ParseConfigFile(IN CONST PCHAR RawConfig,
SectionName = InputData; SectionName = InputData;
/* Find end of the section name */ /* Find end of the section name */
while(*InputData != ']' && *InputData != '\0' && *InputData != '\n') while(*InputData != ']' && *InputData != '\0' && *InputData != '\r' && *InputData != '\n')
{ {
/* Advance to the next character */ /* Advance to the next character */
InputData++; InputData++;
@@ -672,7 +672,7 @@ Configuration::ParseConfigFile(IN CONST PCHAR RawConfig,
Key = InputData; Key = InputData;
/* Find end of the key */ /* Find end of the key */
while(*InputData != '=' && *InputData != '\0' && *InputData != '\n') while(*InputData != '=' && *InputData != '\0' && *InputData != '\r' && *InputData != '\n')
{ {
/* Advance to the next character */ /* Advance to the next character */
InputData++; InputData++;
@@ -700,7 +700,7 @@ Configuration::ParseConfigFile(IN CONST PCHAR RawConfig,
Value = InputData; Value = InputData;
/* Find end of the value */ /* Find end of the value */
while(*InputData != '\0' && *InputData != '\n') while(*InputData != '\0' && *InputData != '\r' && *InputData != '\n')
{ {
/* Advance to the next character */ /* Advance to the next character */
InputData++; InputData++;