From: Francis Dupont Date: Wed, 4 Jan 2017 14:33:03 +0000 (+0100) Subject: [5101] Added an intermediate stream (CID 1398339) X-Git-Tag: fdflex_base^2~1 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=bb4c68f9400ae11bdf9e1d6fe25603e5c52b34ef;p=thirdparty%2Fkea.git [5101] Added an intermediate stream (CID 1398339) --- diff --git a/src/lib/cc/data.cc b/src/lib/cc/data.cc index 7eac622008..e78e19e4c4 100644 --- a/src/lib/cc/data.cc +++ b/src/lib/cc/data.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2010-2017 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -798,11 +798,13 @@ StringElement::toJSON(std::ostream& ss) const { break; default: if ((c >= 0) && (c < 0x20)) { - ss << "\\u" - << hex - << setw(4) - << setfill('0') - << (static_cast(c) & 0xff); + std::ostringstream esc; + esc << "\\u" + << hex + << setw(4) + << setfill('0') + << (static_cast(c) & 0xff); + ss << esc.str(); } else { ss << c; }