Skip to content

Commit

Permalink
Fix arguments parsing with " inside
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Aug 18, 2023
1 parent 6a83eb1 commit 8eec41d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ios_system.m
Original file line number Diff line number Diff line change
Expand Up @@ -2406,7 +2406,9 @@ void replaceCommand(NSString* commandName, NSString* functionName, bool allOccur
write[0] = 0;
return getLastCharacterOfArgument(endquote + 1);
}
return endquote + 1;
// After quote non space character, we should continue till space:
// `ssh "user name"@localhost`
return nextUnescapedCharacter(endquote + 1, ' ');
}
return NULL;
} else if (argument[0] == '\'') {
Expand All @@ -2426,7 +2428,9 @@ void replaceCommand(NSString* commandName, NSString* functionName, bool allOccur
write[0] = 0;
return getLastCharacterOfArgument(endquote);
}
return endquote + 1;
// After quote non space character, we should continue till space
// `ssh "user name"@localhost`
return nextUnescapedCharacter(endquote + 1, ' ');
}
return NULL;
} else if (argument[0] == recordSeparator) {
Expand Down

0 comments on commit 8eec41d

Please sign in to comment.