summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-09-06 13:49:58 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2009-09-06 13:49:58 (GMT)
commit91fec6d89c5538f4642d8320424e4dc128be0976 (patch)
treedd16d6fd8c3b57a665031c7271e1fb0e2b683ebe /Source/cmFileCommand.cxx
parentd78e051f4658d223974e2018618b8bcde6abbbff (diff)
downloadCMake-91fec6d89c5538f4642d8320424e4dc128be0976.zip
CMake-91fec6d89c5538f4642d8320424e4dc128be0976.tar.gz
CMake-91fec6d89c5538f4642d8320424e4dc128be0976.tar.bz2
fix #9316: when converting binary data to hex, also print the leading 0's
Alex
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx2
1 files changed, 1 insertions, 1 deletions
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<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)
{