]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - console.c
make utf8 functions safer: give them a size limit in memory, to allow working with...
[xonotic/darkplaces.git] / console.c
index 4d279b96c8406f71a14035f73f6415a611ff9d9e..6a59b970f4a1d72c830cd4017343ac7fc5ee1276 100644 (file)
--- a/console.c
+++ b/console.c
@@ -1464,7 +1464,7 @@ int Con_DisplayLineFunc(void *passthrough, const char *line, size_t length, floa
                if(isContinuation && *ti->continuationString)
                        x += (int) DrawQ_String_Font(x, ti->y, ti->continuationString, strlen(ti->continuationString), ti->fontsize, ti->fontsize, 1.0, 1.0, 1.0, 1.0, 0, NULL, false, ti->font);
                if(length > 0)
-                       DrawQ_String_Font(x, ti->y, line, u8_strnlen(line, length), ti->fontsize, ti->fontsize, 1.0, 1.0, 1.0, 1.0, 0, &(ti->colorindex), false, ti->font);
+                       DrawQ_String_Font(x, ti->y, line, length, ti->fontsize, ti->fontsize, 1.0, 1.0, 1.0, 1.0, 0, &(ti->colorindex), false, ti->font);
        }
 
        ti->y += ti->fontsize;