From 32f22d1a798ea1c416973e6f0b81780e30da834c Mon Sep 17 00:00:00 2001 From: Alexey Zelkin Date: Wed, 15 Jun 2016 16:18:46 +0000 Subject: [PATCH] Use explicit variable size for copying char. For some reason plain call to "ret.append(&b)" copy 32 bit of data. This change unbreaks CmdLine unit tests for FreeBSD 10, CentOS 7, RHEL 7 and Debian 8. --- src/actions/transformations/cmd_line.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actions/transformations/cmd_line.cc b/src/actions/transformations/cmd_line.cc index 7d567fcf..96b79876 100644 --- a/src/actions/transformations/cmd_line.cc +++ b/src/actions/transformations/cmd_line.cc @@ -72,7 +72,7 @@ std::string CmdLine::evaluate(std::string value, /* copy normal characters */ default : char b = std::tolower(a); - ret.append(&b); + ret.append(&b, 1); space = 0; break; }