summaryrefslogtreecommitdiff
path: root/src/cam/options.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-26 17:48:02 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-26 19:25:19 +0300
commit4c8989cdf7b7fcf1c6e84c2688584c2a7394ea18 (patch)
tree95befe9c4fd16114de1286b91ad8370ddfd3abd1 /src/cam/options.cpp
parent5d987629d9df6f9eeb76079a99810d57c820219e (diff)
cam: options: Fix string concatenation
Adding an integer value to a char pointer doesn't concatenate strings, it indexes in the pointed string. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/cam/options.cpp')
-rw-r--r--src/cam/options.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cam/options.cpp b/src/cam/options.cpp
index b80d361e..bea4a600 100644
--- a/src/cam/options.cpp
+++ b/src/cam/options.cpp
@@ -530,7 +530,7 @@ void OptionsParser::parseValueError(const Option &option)
if (option.name)
optionName = "--" + std::string(option.name);
else
- optionName = "-" + static_cast<char>(option.opt);
+ optionName = "-" + std::string(1, option.opt);
std::cerr << "Can't parse " << option.typeName()
<< " argument for option " << optionName << std::endl;