]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_sdl.c
Turned on the defogger (Don't apply fog to UI. Check notrippy == true)
[xonotic/darkplaces.git] / sys_sdl.c
index 819848614080f06cbe5d79d6c05568bf38c30590..e3b2956edafe19a3c9ba40e72a1a3104e14c6964 100644 (file)
--- a/sys_sdl.c
+++ b/sys_sdl.c
@@ -173,7 +173,7 @@ char *Sys_GetClipboardData (void)
        cliptext = SDL_GetClipboardText();
        if (cliptext != NULL) {
                size_t allocsize;
-               allocsize = strlen(cliptext) + 1;
+               allocsize = min(MAX_INPUTLINE, strlen(cliptext) + 1);
                data = (char *)Z_Malloc (allocsize);
                strlcpy (data, cliptext, allocsize);
                SDL_free(cliptext);