]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - keys.c
fixed all VS2005 deprecated function warnings
[xonotic/darkplaces.git] / keys.c
diff --git a/keys.c b/keys.c
index bc20e8be121f73d820b4382da4256fd5fba5f0ba..b6747acbb81ee8c5bcde2f4e94e3aa40f70dcd96 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -288,7 +288,19 @@ Key_Console (int key, char ascii)
                if ((cbd = Sys_GetClipboardData()) != 0)
                {
                        int i;
+#if 1
+                       while (*cbd)
+                       {
+                               if (*cbd == '\n' || *cbd == '\r' || *cbd == '\b')
+                               {
+                                       *cbd++ = 0;
+                                       break;
+                               }
+                               cbd++;
+                       }
+#else
                        strtok(cbd, "\n\r\b");
+#endif
                        i = (int)strlen(cbd);
                        if (i + key_linepos >= MAX_INPUTLINE)
                                i= MAX_INPUTLINE - key_linepos;