Commit 91fec6d8 authored by Alexander Neundorf's avatar Alexander Neundorf
Browse files

fix #9316: when converting binary data to hex, also print the leading 0's

parent d78e051f
......@@ -305,7 +305,7 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
while((sizeLimit != 0) && (c = file.get(), file))
char hex[4];
sprintf(hex, "%x", c&0xff);
sprintf(hex, "%.2x", c&0xff);
output += hex;
if (sizeLimit > 0)
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