mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 18:42:12 +08:00
26 lines
529 B
Diff
26 lines
529 B
Diff
--- trunk/code/qcommon/cmd.c 2009/01/13 07:57:03 1492
|
|
+++ trunk/code/qcommon/cmd.c 2009/01/17 23:09:58 1493
|
|
@@ -434,6 +434,22 @@
|
|
}
|
|
|
|
/*
|
|
+ Replace command separators with space to prevent interpretation
|
|
+ This is a hack to protect buggy qvms
|
|
+ https://bugzilla.icculus.org/show_bug.cgi?id=3593
|
|
+*/
|
|
+void Cmd_Args_Sanitize( void ) {
|
|
+ int i;
|
|
+ for ( i = 1 ; i < cmd_argc ; i++ ) {
|
|
+ char* c = cmd_argv[i];
|
|
+ while ((c = strpbrk(c, "\n\r;"))) {
|
|
+ *c = ' ';
|
|
+ ++c;
|
|
+ }
|
|
+ }
|
|
+}
|
|
+
|
|
+/*
|
|
============
|
|
Cmd_TokenizeString
|
|
|