Permalink
Browse files

Merge pull request #11 from bahamas10/fix-octal-parse

Fixes #10 : 08, 09, etc being parsed as octal
  • Loading branch information...
2 parents 3967100 + 781ac30 commit b90e82f2826db3b8e64b37a7311bd62d22e0d2ad @leetreveil committed Oct 1, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/musicmetadata.js
@@ -164,8 +164,8 @@ function cleanupArtist(origVal) {
//or 1 to no : 1, of : 0
function cleanupTrack(origVal) {
var split = origVal.toString().split('/');
- var number = parseInt(split[0]) || 0;
- var total = parseInt(split[1]) || 0;
+ var number = parseInt(split[0], 10) || 0;
+ var total = parseInt(split[1], 10) || 0;
return { no : number, of : total };
}
@@ -221,4 +221,4 @@ strtok.INT32SYNCSAFE = {
((buf[off + 1]) << 14) |
((buf[off]) << 21);
}
-};
+};

0 comments on commit b90e82f

Please sign in to comment.