summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d384610)
raw | patch | inline | side by side (parent: d384610)
author | pjrm <pjrm@users.sourceforge.net> | |
Thu, 5 Jun 2008 06:33:14 +0000 (06:33 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Thu, 5 Jun 2008 06:33:14 +0000 (06:33 +0000) |
snprintf size arg includes \0, so pass sizeof(buf) instead of that minus 1.
src/extension/internal/odf.cpp | patch | blob | history |
index dd2bcb42c0224472df28171f04801d35ebcf13b7..9a570c2901a8d688877447f4f0f46b03f10dfbfc 100644 (file)
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: ";
outs.printf("<svg:linearGradient ");
outs.printf("id=\"%#s_g\" ", gi.name.c_str());
outs.printf("draw:name=\"%#s_g\"\n", gi.name.c_str());
- outs.printf(" draw:display-name=\"imported linear %d\"\n",
+ outs.printf(" draw:display-name=\"imported linear %u\"\n",
gradientCount);
outs.printf(" svg:x1=\"%05.3fcm\" svg:y1=\"%05.3fcm\"\n",
gi.x1, gi.y1);