1
0
mirror of http://mpg123.de/trunk/.git synced 2025-07-30 02:01:12 +03:00

Do not leave the data fields modified after print_lines - that screwed raw tag display.

git-svn-id: svn://scm.orgis.org/mpg123/trunk@1211 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
thor
2007-12-02 00:02:35 +00:00
parent 1fc0405c78
commit 8033f75a05

View File

@ -55,13 +55,18 @@ void print_lines(const char* prefix, mpg123_string *inlines)
{
if(lines[i] == '\n' || lines[i] == '\r' || lines[i] == 0)
{
if(lines[i] == '\n') ++hadlf;
if(lines[i] == '\r') ++hadcr;
char save = lines[i]; /* saving, changing, restoring a byte in the data */
if(save == '\n') ++hadlf;
if(save == '\r') ++hadcr;
if((hadcr || hadlf) && hadlf % 2 == 0 && hadcr % 2 == 0) line = "";
lines[i] = 0;
if(line){ printf("%s%s\n", prefix, line); line = NULL; }
if(line)
{
lines[i] = 0;
printf("%s%s\n", prefix, line);
line = NULL;
lines[i] = save;
}
}
else
{