diff --git a/code/renderer/tr_font.c b/code/renderer/tr_font.c index 330760bb..e1eb4868 100644 --- a/code/renderer/tr_font.c +++ b/code/renderer/tr_font.c @@ -397,8 +397,8 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) { font->glyphs[i].s2 = readFloat(); font->glyphs[i].t2 = readFloat(); font->glyphs[i].glyph = readInt(); - Com_Memcpy(font->glyphs[i].shaderName, &fdFile[fdOffset], 32); - fdOffset += 32; + Q_strncpyz(font->glyphs[i].shaderName, (const char *)&fdFile[fdOffset], sizeof(font->glyphs[i].shaderName)); + fdOffset += sizeof(font->glyphs[i].shaderName); } font->glyphScale = readFloat(); Com_Memcpy(font->name, &fdFile[fdOffset], MAX_QPATH);