diff options
author | Max Kellermann <max@duempel.org> | 2009-11-19 19:59:34 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-11-19 19:59:34 +0100 |
commit | c33bbd947b6afbb9438dc485c890394be096d0d1 (patch) | |
tree | a297c1bd447f7ab44cf010f3bd5b1cbafe149b0b /src/decoder/_flac_common.c | |
parent | d37b4bb199cbe5c34ad8bcf36be26cd7c3caa11d (diff) | |
parent | 21fdf47b563ab7684dc7022aadf5d63bb011ea52 (diff) | |
download | mpd-c33bbd947b6afbb9438dc485c890394be096d0d1.tar.gz mpd-c33bbd947b6afbb9438dc485c890394be096d0d1.tar.xz mpd-c33bbd947b6afbb9438dc485c890394be096d0d1.zip |
Merged release 0.15.6 from branch 'v0.15.x'
Conflicts:
NEWS
configure.ac
Diffstat (limited to 'src/decoder/_flac_common.c')
-rw-r--r-- | src/decoder/_flac_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c index 213516524..f12b8bff0 100644 --- a/src/decoder/_flac_common.c +++ b/src/decoder/_flac_common.c @@ -223,11 +223,11 @@ flac_vtrack_tnum(const char* fname) * another/better way would be to use tag struct */ char* ptr = strrchr(fname, '_'); + if (ptr == NULL) + return 0; // copy ascii tracknumber to int - char vtrack[4]; - g_strlcpy(vtrack, ++ptr, 4); - return (unsigned int)strtol(vtrack, NULL, 10); + return (unsigned int)strtol(++ptr, NULL, 10); } #endif /* FLAC_API_VERSION_CURRENT >= 7 */ |