From: pjrm Date: Thu, 5 Jun 2008 06:33:14 +0000 (+0000) Subject: a couple of trivial %d -> %u changes. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=db3d7e286956ffa1408807197971d5277eea3b31;p=inkscape.git a couple of trivial %d -> %u changes. snprintf size arg includes \0, so pass sizeof(buf) instead of that minus 1. --- 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("