(svn r6875) -Feature: Allow for " to be in console tokens. Escape them with \. eg \".
This commit is contained in:
		@@ -1091,6 +1091,12 @@ void IConsoleCmdExec(const char *cmdstr)
 | 
				
			|||||||
		case '"': /* Tokens enclosed in "" are one token */
 | 
							case '"': /* Tokens enclosed in "" are one token */
 | 
				
			||||||
			longtoken = !longtoken;
 | 
								longtoken = !longtoken;
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 | 
							case '\\': /* Escape character for "" */
 | 
				
			||||||
 | 
								if (cmdptr[1] == '"' && tstream_i + 1 < lengthof(tokenstream)) {
 | 
				
			||||||
 | 
									tokenstream[tstream_i++] = *++cmdptr;
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								/* fallthrough */
 | 
				
			||||||
		default: /* Normal character */
 | 
							default: /* Normal character */
 | 
				
			||||||
			tokenstream[tstream_i++] = *cmdptr;
 | 
								tokenstream[tstream_i++] = *cmdptr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user