X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fscreen.cpp;fp=src%2Fscreen.cpp;h=fdda2521b105d65ae9c963ec7f2ee7303185dcf5;hp=dc59de90904d684a6cc378283a1028bdafd783a1;hb=c99e399282b8e19748ef9fa5d703c3fc32783a2d;hpb=39599aa6423d3e0181fbfe2aac8f78f388a3f372 diff --git a/src/screen.cpp b/src/screen.cpp index dc59de9..fdda252 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -378,7 +378,7 @@ void Screen::DebugFontInit(const char *name, float font_size) size_t font_file_size = ftell(font_file); fseek(font_file, 0, SEEK_SET); unsigned char *font_file_data = (unsigned char*)malloc(font_file_size); - fread(font_file_data, 1, font_file_size, font_file); + SDL_assert(fread(font_file_data, 1, font_file_size, font_file) == font_file_size); fclose(font_file); stbtt_BakeFontBitmap(font_file_data,0, font_size, font_atlas_data,1024,1024, 32,96, m_debug_font_rects); free(font_file_data);