summaryrefslogtreecommitdiff
path: root/apt-private/private-update.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-05-27 18:10:39 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-05-27 19:14:38 +0200
commitb58e2c7c56b1416a343e81f9f80cb1f02c128e25 (patch)
treedbd92b2a460c2dd5d2a4a9ccc5d80657b24b32c1 /apt-private/private-update.cc
parent124e6916b7b02984803ff8217e8163947aae2882 (diff)
prevent C++ locale number formatting in text APIs
Setting the C++ locale via std::locale::global(std::locale("")); which would otherwise default to the default C locale (aka: unaffected by setlocale) effects the formatting of numeric types in IO streams, which for output for humans is perfectly sensible, but breaks our many text interfaces used and parsed by us and others without expecting the numbers to be formatted. Closes: #825396
Diffstat (limited to 'apt-private/private-update.cc')
-rw-r--r--apt-private/private-update.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc
index 1e5d69512..ba953a088 100644
--- a/apt-private/private-update.cc
+++ b/apt-private/private-update.cc
@@ -58,8 +58,8 @@ bool DoUpdate(CommandLine &CmdL)
if(compExt.empty() == false &&
APT::String::Endswith(FileName, compExt))
FileName = FileName.substr(0, FileName.size() - compExt.size() - 1);
- c1out << '\'' << I->URI << "' " << FileName << ' ' <<
- I->Owner->FileSize << ' ' << I->Owner->HashSum() << std::endl;
+ c1out << '\'' << I->URI << "' " << FileName << ' ' <<
+ std::to_string(I->Owner->FileSize) << ' ' << I->Owner->HashSum() << std::endl;
}
return true;
}