From db3d7e286956ffa1408807197971d5277eea3b31 Mon Sep 17 00:00:00 2001 From: pjrm Date: Thu, 5 Jun 2008 06:33:14 +0000 Subject: [PATCH] a couple of trivial %d -> %u changes. snprintf size arg includes \0, so pass sizeof(buf) instead of that minus 1. --- src/extension/internal/odf.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index dd2bcb42c..9a570c290 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -1095,8 +1095,8 @@ OdfOutput::preprocess(ZipFile &zf, Inkscape::XML::Node *node) if (imageTable.find(oldName) == imageTable.end()) { char buf[64]; - snprintf(buf, 63, "Pictures/image%d%s", - (int)imageTable.size(), ext.c_str()); + snprintf(buf, sizeof(buf), "Pictures/image%u%s", + imageTable.size(), ext.c_str()); Glib::ustring newName = buf; imageTable[oldName] = newName; Glib::ustring comment = "old name was: "; @@ -1353,7 +1353,7 @@ bool OdfOutput::writeStyle(ZipFile &zf) outs.printf("