"test/vscode:/vscode.git/clone" did not exist on "2e8841c6fa0052420a3437eafa1f40c46cbdb2b1"
Commit 25b5e9fe authored by jbeder's avatar jbeder
Browse files

Fixed hex output in emitter (should be always two hex chars)

parent c4e1446d
......@@ -2,8 +2,9 @@
#include "exp.h"
#include "indentation.h"
#include "exceptions.h"
#include <sstream>
#include "stringsource.h"
#include <sstream>
#include <iomanip>
namespace YAML
{
......@@ -82,7 +83,7 @@ namespace YAML
} else {
// TODO: for the common escaped characters, give their usual symbol
std::stringstream str;
str << "\\x" << std::hex << static_cast <int>(ch);
str << "\\x" << std::hex << std::setfill('0') << std::setw(2) << static_cast <int>(ch);
out << str.str();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment