Previously, there is no mode setting with dumpToFile, so it worked with text mode by default. This PR fixed the bug.
Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
if (!ptr)
INTERNAL_EXN("Graph was not serialized by FlatBuffer for some reason");
- std::ofstream file(path);
+ std::ofstream file(path, std::ofstream::binary);
file.write(ptr, size);
}
if (!ptr)
INTERNAL_EXN("Graph was not serialized by FlatBuffer for some reason");
- std::ofstream file(path);
+ std::ofstream file(path, std::ofstream::binary);
file.write(ptr, size);
}