diff options
Diffstat (limited to 'src/dom/io/domstream.cpp')
| -rw-r--r-- | src/dom/io/domstream.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dom/io/domstream.cpp b/src/dom/io/domstream.cpp index 6c315990d..c6234d462 100644 --- a/src/dom/io/domstream.cpp +++ b/src/dom/io/domstream.cpp @@ -95,6 +95,13 @@ static int dprintInt(Writer &outs, buf.insert(buf.begin(), '0'); } + if (buf.size() == 0) + buf = "0"; + + int pad = width - (int)buf.size(); + for (int i=0 ; i<pad ; i++) + buf.insert(buf.begin(), '0'); + //### Output the result for (unsigned int i=0 ; i<buf.size() ; i++) { |
