diff --git a/lib/captcha/getdistorts.js b/lib/captcha/getdistorts.js index f16696c8..03fd2601 100644 --- a/lib/captcha/getdistorts.js +++ b/lib/captcha/getdistorts.js @@ -13,8 +13,8 @@ module.exports = async (width, height, numDistorts, distortion) => { for (let i = 0; i < randNumDistorts; i++) { //start and end of divided width - const divStart = (div * i) - , divEnd = (div * (i + 1)); + const divStart = Math.floor(div * i) + , divEnd = Math.floor(div * (i + 1)); //origin coordinate for distortion point const originx = await randomRange(divStart, divEnd)