]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.c
MSG_ReadString: if hitting the max length of the string, continue to read until NUL...
[xonotic/darkplaces.git] / common.c
index 8e9bf40a40f8273e4476faabdc0fd802c4ffa514..5539b0aff0adfd752d3302eededaacada4bb1fa7 100644 (file)
--- a/common.c
+++ b/common.c
@@ -496,6 +496,9 @@ char *MSG_ReadString (void)
        int l,c;
        for (l = 0;l < (int) sizeof(string) - 1 && (c = MSG_ReadByte()) != -1 && c != 0;l++)
                string[l] = c;
+       // read the rest of the string anyway
+       while(c != -1 && c != 0)
+               c = MSG_ReadByte();
        string[l] = 0;
        return string;
 }