wrong calculation of width in the card as width = 208; // 3 * 20 (margins) + 8 * 13 (charWidth) + 44 (diameter).but the calculation will lead to 188.
function card(
CardType cardType,
string memory content,
string memory circle
)
internal
pure
returns (uint256 width, string memory card_)
{
string memory caption = stringifyCardType(cardType);
// The progress card can have a fixed width because the content is never longer than the caption. The former
// has 6 characters (at most, e.g. "42.09%"), whereas the latter has 8 characters ("Progress").
if (cardType == CardType.PROGRESS) {
// The progress can be 0%, in which case the circle is not rendered.
if (circle.equal("")) {
width = 144; // 2 * 20 (margins) + 8 * 13 (charWidth)
} else {
@>> width = 208; // 3 * 20 (margins) + 8 * 13 (charWidth) + 44 (diameter)
}
}
wrong calculation of width.
width = 188; // 3 * 20 (margins) + 8 * 13 (charWidth) + 44 (diameter)
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.