fix bilibili danmaku color parse error

This commit is contained in:
DIYgod
2016-12-05 01:14:51 +08:00
parent 3729406972
commit 7b0e21915d
+1 -1
View File
@@ -15,7 +15,7 @@ module.exports = function (req, res) {
var cid = query.cid;
function addZero(str, length){
return new Array(length - str.length + 1).join("0") + str;
return new Array(Math.max(length - str.length + 1, 0)).join("0") + str;
}
if (cid) {