summaryrefslogtreecommitdiff
path: root/junklib.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-09-16 21:47:27 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-09-16 21:47:27 +0200
commite33f207c2e465b6211873ce24fb1a1959317e63a (patch)
tree7ef4a794bb69acd79650d3729b533e8e82982957 /junklib.c
parent57f09034f293b027e0ea80d86e97aaa6006f96c2 (diff)
junklib: get rid of strnlen to fix osx 10.6 compile issue
Diffstat (limited to 'junklib.c')
-rw-r--r--junklib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/junklib.c b/junklib.c
index 04b29628..03a0f99c 100644
--- a/junklib.c
+++ b/junklib.c
@@ -2925,7 +2925,11 @@ junk_load_comm_frame (int version_major, playItem_t *it, uint8_t *readptr, int s
* or "album". Also only supports peak value if stored as 16 bits. */
static int junk_id3v2_load_rva2 (int version_major, playItem_t *it, uint8_t *readptr, int synched_size) {
char *rva_desc = readptr;
- unsigned rva_desc_len = strnlen(rva_desc, synched_size);
+ unsigned rva_desc_len = 0;
+ const char *p = rva_desc;
+ while (*p++ && rva_desc_len < synched_size) {
+ rva_desc_len++;
+ }
if(rva_desc_len == synched_size) { /* tag too short */
return -1;