From 91fec6d89c5538f4642d8320424e4dc128be0976 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 6 Sep 2009 09:49:58 -0400 Subject: fix #9316: when converting binary data to hex, also print the leading 0's Alex --- Source/cmFileCommand.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index a8060b0..d1979dd 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -305,7 +305,7 @@ bool cmFileCommand::HandleReadCommand(std::vector 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) { -- cgit v0.12