summaryrefslogtreecommitdiff
path: root/src/tag
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-04-27 13:58:02 +0200
committerMax Kellermann <max@musicpd.org>2020-04-27 14:01:54 +0200
commitbca9678683eb8dbb31e7b5f348d9a3436639de22 (patch)
tree24f90ae80e7d0c5b8d83296298cfe0b1b416400d /src/tag
parent814b2a218d120e9633c3f566a152f7d0ecdf597b (diff)
tag/FixString: use IsNonPrintableASCII()
Fixes breakage of non-ASCII characters, regression from commit cc72ceb368185381851bec2d7d4fe1c4d69b3f46 Fixes https://github.com/MusicPlayerDaemon/MPD/issues/842
Diffstat (limited to 'src/tag')
-rw-r--r--src/tag/FixString.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tag/FixString.cxx b/src/tag/FixString.cxx
index ee6553bd8..bc18ff65c 100644
--- a/src/tag/FixString.cxx
+++ b/src/tag/FixString.cxx
@@ -90,7 +90,7 @@ static const char *
find_non_printable(StringView p)
{
for (const char &ch : p)
- if (!IsPrintableASCII(ch))
+ if (IsNonPrintableASCII(ch))
return &ch;
return nullptr;
@@ -110,7 +110,7 @@ clear_non_printable(StringView src)
char *dest = (char *)xmemdup(src.data, src.size);
for (size_t i = first - src.data; i < src.size; ++i)
- if (!IsPrintableASCII(dest[i]))
+ if (IsNonPrintableASCII(dest[i]))
dest[i] = ' ';
return { dest, src.size };