Fix parsing of Windows new lines on Mk6 import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
744e14b450
commit
70939a1d84
7
file.c
7
file.c
@ -423,9 +423,14 @@ char *parse_mkvi_value(const char *haystack, const char *needle)
|
||||
valueptr += 2;
|
||||
}
|
||||
if ((endptr = strstr(lineptr, "\n")) != NULL) {
|
||||
char terminator = '\n';
|
||||
if (*(endptr - 1) == '\r') {
|
||||
--endptr;
|
||||
terminator = '\r';
|
||||
}
|
||||
*endptr = 0;
|
||||
ret = strdup(valueptr);
|
||||
*endptr = '\n';
|
||||
*endptr = terminator;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user