Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
614a0118
Commit
614a0118
authored
Jul 28, 2009
by
Courtney Cavin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/lastfm: Ensure multiple identical xml entities are decoded.
Previously, if two identical entities appeared in one string, only the first would get decoded. This fixes that bug.
parent
0c66832b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
lastfm_input_plugin.c
src/input/lastfm_input_plugin.c
+5
-6
No files found.
src/input/lastfm_input_plugin.c
View file @
614a0118
...
...
@@ -175,13 +175,12 @@ lastfm_xmldecode(const char *value)
unsigned
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
entities
)
/
sizeof
(
entities
[
0
]);
++
i
)
{
char
*
p
;
int
slen
=
strlen
(
entities
[
i
].
text
);
char
*
p
=
strstr
(
txt
,
entities
[
i
].
text
);
if
(
p
==
NULL
)
continue
;
*
p
=
entities
[
i
].
repl
;
g_strlcpy
(
p
+
1
,
p
+
slen
,
strlen
(
p
)
-
slen
);
while
((
p
=
strstr
(
txt
,
entities
[
i
].
text
)))
{
*
p
=
entities
[
i
].
repl
;
g_strlcpy
(
p
+
1
,
p
+
slen
,
strlen
(
p
)
-
slen
);
}
}
return
txt
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment