]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_draw.c
make DP compile with C++ again
[xonotic/darkplaces.git] / gl_draw.c
index fad253b9f8ab5fbe8ceca78a27ce6e9a9763e204..18a4d2a955891c3e42347e0a18d71659d51ffab7 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -963,9 +963,9 @@ float DrawQ_TextWidth_Font_UntilWidth_TrackColors(const char *text, size_t *maxl
        {
                if (text[i] == ' ')
                {
-                       if(x + fnt->width_of[' '] > maxwidth)
+                       if(x + fnt->width_of[(int) ' '] > maxwidth)
                                break; // oops, can't draw this
-                       x += fnt->width_of[' '];
+                       x += fnt->width_of[(int) ' '];
                        continue;
                }
                if (text[i] == STRING_COLOR_TAG && !ignorecolorcodes && i + 1 < *maxlen)
@@ -1108,7 +1108,7 @@ float DrawQ_String_Font(float startx, float starty, const char *text, size_t max
                {
                        if (text[i] == ' ')
                        {
-                               x += fnt->width_of[' '] * w;
+                               x += fnt->width_of[(int) ' '] * w;
                                continue;
                        }
                        if (text[i] == STRING_COLOR_TAG && !ignorecolorcodes && i + 1 < maxlen)