summaryrefslogtreecommitdiff
path: root/cli/options.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cli/options.cxx')
-rw-r--r--cli/options.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/options.cxx b/cli/options.cxx
index 3f3c1b9..1c46fd4 100644
--- a/cli/options.cxx
+++ b/cli/options.cxx
@@ -351,10 +351,11 @@ namespace cli
// If the string is wrapped in quotes, remove them.
//
n = s2.size ();
+ char cf (s2[0]), cl (s2[n - 1]);
- if (s2[0] == '"' || s2[n - 1] == '"')
+ if (cf == '"' || cf == '\'' || cl == '"' || cl == '\'')
{
- if (n == 1 || s2[0] != s2[n - 1])
+ if (n == 1 || cf != cl)
throw unmatched_quote (s2);
s2 = string (s2, 1, n - 2);