Fix bug on server-side random

    Icon number was sometimes set to 0
parent 532fc4ed
Pipeline #1485 passed with stage
in 43 seconds
......@@ -48,7 +48,7 @@ app.use(function(req, res, next) {
} while (req.args.fgColor === req.args.bgColor);
req.args.text = _(sampleTexts[Math.floor(Math.random() * sampleTexts.length)]);
req.args.font = _fonts[Math.floor(Math.random() * _fonts.length)];
req.args.icon = Math.floor(Math.random() * 36);
req.args.icon = Math.ceil(Math.random() * 36);
req.args.signature = _(sampleSignatures[Math.floor(Math.random() * sampleSignatures.length)]);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment