Incorrect formatting of parameters in padding function