浏览代码

[rtext] Added cast to ExportFontAsCode output to fix C++ compiler errors (#4013)

DarkAssassin23 1 年之前
父节点
当前提交
2804e75869
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/rtext.c

+ 2 - 2
src/rtext.c

@@ -1093,8 +1093,8 @@ bool ExportFontAsCode(Font font, const char *fileName)
 #else
     byteCount += sprintf(txtData + byteCount, "    // Assign glyph recs and info data directly\n");
     byteCount += sprintf(txtData + byteCount, "    // WARNING: This font data must not be unloaded\n");
-    byteCount += sprintf(txtData + byteCount, "    font.recs = fontRecs_%s;\n", fileNamePascal);
-    byteCount += sprintf(txtData + byteCount, "    font.glyphs = fontGlyphs_%s;\n\n", fileNamePascal);
+    byteCount += sprintf(txtData + byteCount, "    font.recs = (Rectangle *)fontRecs_%s;\n", fileNamePascal);
+    byteCount += sprintf(txtData + byteCount, "    font.glyphs = (GlyphInfo *)fontGlyphs_%s;\n\n", fileNamePascal);
 #endif
     byteCount += sprintf(txtData + byteCount, "    return font;\n");
     byteCount += sprintf(txtData + byteCount, "}\n");