summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-09-05 06:48:33 +0000
committerJens Arnold <amiconn@rockbox.org>2007-09-05 06:48:33 +0000
commitaf533820ee49ac6f940293b22bb557b36bf75f7d (patch)
tree45806391001b156f30f63b8fc6a0c9a3b98271ff
parentfcab06125025e86dbad42e49af1c0b5c2a3085fb (diff)
downloadrockbox-af533820ee49ac6f940293b22bb557b36bf75f7d.tar.gz
rockbox-af533820ee49ac6f940293b22bb557b36bf75f7d.zip
More efficient version of the fix.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14619 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/id3.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/firmware/id3.c b/firmware/id3.c
index 2a894aab10..2fd7894de8 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -512,13 +512,12 @@ static int unicode_len(char encoding, const void* string)
int len = 0;
if (encoding == 0x01 || encoding == 0x02) {
- bool iswchar;
+ char first;
const char *s = string;
/* string might be unaligned, so using short* can crash on ARM and SH1 */
do {
- iswchar = (*s++ != 0);
- iswchar |= (*s++ != 0);
- } while (iswchar);
+ first = *s++;
+ } while ((first | *s++) != 0);
len = s - (const char*) string;
} else {