diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2006-06-30 01:46:04 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2006-06-30 01:46:04 +0000 |
| commit | 7302b498a534889075f627c8b7bb766faf466f86 (patch) | |
| tree | 07b8313c0fe1ede76899abe4db3ab1bd02eff36d /src/dom/io/domstream.cpp | |
| parent | * src/connector-context.cpp, src/widgets/toolbox.cpp: (diff) | |
| download | inkscape-7302b498a534889075f627c8b7bb766faf466f86.tar.gz inkscape-7302b498a534889075f627c8b7bb766faf466f86.zip | |
Fix integer padding
(bzr r1324)
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++) { |
