summaryrefslogtreecommitdiff
path: root/retrace
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-05-20 14:02:51 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-05-20 14:17:49 +0100
commita6b011b102975ab75cf5f130ec1be93b24d913ee (patch)
tree94cd00d5dbf8b06b103dc28e107a27a6a6f86412 /retrace
parentd75bd30437ac1465cdb8a35d21079a14cbf63c2d (diff)
retrace: Ensure stdout is in binary mode when dumping UBJSON.
Diffstat (limited to 'retrace')
-rw-r--r--retrace/retrace_main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/retrace/retrace_main.cpp b/retrace/retrace_main.cpp
index 3e2f9ee2..7b9268f8 100644
--- a/retrace/retrace_main.cpp
+++ b/retrace/retrace_main.cpp
@@ -735,6 +735,7 @@ int main(int argc, char **argv)
if (strcasecmp(optarg, "json") == 0) {
stateWriterFactory = &createJSONStateWriter;
} else if (strcasecmp(optarg, "ubjson") == 0) {
+ os::setBinaryMode(stdout);
stateWriterFactory = &createUBJSONStateWriter;
} else {
std::cerr << "error: unsupported dump format `" << optarg << "`\n";