Skip to content

Commit

Permalink
don't normalise line endings in lyrics and long description
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkypumpkin committed Jun 8, 2021
1 parent 8853f6a commit 645c6f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/parsley.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2167,10 +2167,12 @@ void APar_MetaData_atomLyrics_Set(const char* lyricsPath) {
while (remaining && (sol = fgets(dest, remaining + 1, lyrics_file))) {
size_t len = strlen(sol); //NUL bytes in the file will cause parts of the text to be skipped
//normalize different EOL styles to carriage returns
/*
if (sol[len-1] == '\n') {
if (sol[len-2] == '\r') sol[--len] = '\0';
else sol[len-1] = '\r';
}
*/
remaining -= len;
dest += len;
}
Expand Down Expand Up @@ -2206,10 +2208,12 @@ void APar_MetaData_atomLongdesc_Set(const char* longdescPath) {
while (remaining && (sol = fgets(dest, remaining + 1, longdesc_file))) {
size_t len = strlen(sol); //NUL bytes in the file will cause parts of the text to be skipped
//normalize different EOL styles to carriage returns
/*
if (sol[len-1] == '\n') {
if (sol[len-2] == '\r') sol[--len] = '\0';
else sol[len-1] = '\r';
}
*/
remaining -= len;
dest += len;
}
Expand Down

0 comments on commit 645c6f6

Please sign in to comment.