use MwStringPrintIntoBuffer

This commit is contained in:
Nishi 2026-05-09 02:43:32 +09:00
commit 416bdaf25e
Signed by: nishi
GPG key ID: 27EF69B208EB9343

View file

@ -179,7 +179,7 @@ static void draw(MwWidget handle) {
p[0].x = r.width / 2; p[0].x = r.width / 2;
p[0].y = (r.height - sh) / 2; p[0].y = (r.height - sh) / 2;
sprintf(buf, "%d", MwGetInteger(handle, MwNdate)); MwStringPrintIntoBuffer(buf, 3, "%d", MwGetInteger(handle, MwNdate));
MwDrawText(handle, MwFLBuildFont(MwFLFlagBold), p, buf, MwALIGNMENT_CENTER, ct); MwDrawText(handle, MwFLBuildFont(MwFLFlagBold), p, buf, MwALIGNMENT_CENTER, ct);
r3 = r2; r3 = r2;
@ -202,7 +202,7 @@ static void draw(MwWidget handle) {
MwLLDrawPixmap(handle->lowlevel, &r2, px); MwLLDrawPixmap(handle->lowlevel, &r2, px);
MwLLDestroyPixmap(px); MwLLDestroyPixmap(px);
sprintf(buf, "%d", MwGetInteger(handle, MwNyear)); MwStringPrintIntoBuffer(buf, 5, "%d", MwGetInteger(handle, MwNyear));
px = blit(handle, buf, c, cf, gh); px = blit(handle, buf, c, cf, gh);
r2 = r3; r2 = r3;