diff options
Diffstat (limited to 'minui')
-rw-r--r-- | minui/graphics.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/minui/graphics.cpp b/minui/graphics.cpp index 3bdc33fd1..3bfce11d8 100644 --- a/minui/graphics.cpp +++ b/minui/graphics.cpp @@ -258,7 +258,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; } @@ -291,7 +291,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; |