summaryrefslogtreecommitdiffstats
path: root/minui
diff options
context:
space:
mode:
Diffstat (limited to 'minui')
-rw-r--r--minui/graphics.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/minui/graphics.cpp b/minui/graphics.cpp
index c0c67f948..41e24f13f 100644
--- a/minui/graphics.cpp
+++ b/minui/graphics.cpp
@@ -253,7 +253,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;
}
@@ -286,7 +286,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;