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>
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user