summaryrefslogtreecommitdiffstats
path: root/minui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--minui/graphics.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/minui/graphics.cpp b/minui/graphics.cpp
index dcca3ec41..a3a958819 100644
--- a/minui/graphics.cpp
+++ b/minui/graphics.cpp
@@ -265,7 +265,7 @@ unsigned int gr_get_height(GRSurface* surface) {
}
int gr_init_font(const char* name, GRFont** dest) {
- GRFont* font = reinterpret_cast<GRFont*>(calloc(1, sizeof(*gr_font)));
+ GRFont* font = static_cast<GRFont*>(calloc(1, sizeof(*gr_font)));
if (font == nullptr) {
return -1;
}
@@ -298,7 +298,7 @@ static void gr_init_font(void)
// fall back to the compiled-in font.
- gr_font = static_cast<GRFont*>(calloc(sizeof(*gr_font), 1));
+ gr_font = static_cast<GRFont*>(calloc(1, sizeof(*gr_font)));
gr_font->texture = static_cast<GRSurface*>(malloc(sizeof(*gr_font->texture)));
gr_font->texture->width = font.width;
gr_font->texture->height = font.height;