From 4c8989cdf7b7fcf1c6e84c2688584c2a7394ea18 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 26 Apr 2019 17:48:02 +0300 Subject: cam: options: Fix string concatenation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Niklas Söderlund Reviewed-by: Kieran Bingham --- src/cam/options.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cam') 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(option.opt); + optionName = "-" + std::string(1, option.opt); std::cerr << "Can't parse " << option.typeName() << " argument for option " << optionName << std::endl; -- cgit v1.2.1