mirror of
https://github.com/MathiasLui/CSGO-Projects.git
synced 2025-05-06 22:01:18 +00:00
Fix leading whitespaces corrupting commands
This commit is contained in:
parent
ba30d9f586
commit
ab8625cb9c
1 changed files with 3 additions and 1 deletions
|
@ -99,7 +99,9 @@ namespace SteamShared.SourceConfig
|
||||||
// We've reached end of line, a gap between commands or just padding, a quote or the end of command, always break at newlines or semis
|
// We've reached end of line, a gap between commands or just padding, a quote or the end of command, always break at newlines or semis
|
||||||
|
|
||||||
// We might be at the first unquoted space after a command as well, this would mean... oh yeah! we finally finished fetching that command name!
|
// We might be at the first unquoted space after a command as well, this would mean... oh yeah! we finally finished fetching that command name!
|
||||||
cmdNameParsed = true;
|
// But if there's unwanted whitespaces BEFORE the command we would break prematurely, so make sure it actually has content
|
||||||
|
if(!cmdNameParsed && !string.IsNullOrWhiteSpace(cmdString.ToString()))
|
||||||
|
cmdNameParsed = true;
|
||||||
|
|
||||||
wasInQuoted = false;
|
wasInQuoted = false;
|
||||||
if (curChar == '\"')
|
if (curChar == '\"')
|
||||||
|
|
Loading…
Add table
Reference in a new issue