[Scummvm-cvs-logs] SF.net SVN: scummvm:[47303] tools/trunk/engines/scumm/descumm.cpp
tdhs at users.sourceforge.net
tdhs at users.sourceforge.net
Fri Jan 15 04:59:45 CET 2010
Revision: 47303
http://scummvm.svn.sourceforge.net/scummvm/?rev=47303&view=rev
Author: tdhs
Date: 2010-01-15 03:59:45 +0000 (Fri, 15 Jan 2010)
Log Message:
-----------
Fixed GCC warnings in descumm, due to missing sprintf formats.
Modified Paths:
--------------
tools/trunk/engines/scumm/descumm.cpp
Modified: tools/trunk/engines/scumm/descumm.cpp
===================================================================
--- tools/trunk/engines/scumm/descumm.cpp 2010-01-15 03:11:35 UTC (rev 47302)
+++ tools/trunk/engines/scumm/descumm.cpp 2010-01-15 03:59:45 UTC (rev 47303)
@@ -486,23 +486,23 @@
if (g_options.scriptVersion >= 5 &&
i < ARRAYSIZE(var_names5) && var_names5[i]) {
- buf += sprintf(buf, var_names5[i]);
+ buf += sprintf(buf, "%s", var_names5[i]);
return buf;
} else if (g_options.scriptVersion >= 4 &&
i < ARRAYSIZE(var_names4) && var_names4[i]) {
- buf += sprintf(buf, var_names4[i]);
+ buf += sprintf(buf, "%s", var_names4[i]);
return buf;
} else if (g_options.scriptVersion >= 3 &&
i < ARRAYSIZE(var_names3) && var_names3[i]) {
- buf += sprintf(buf, var_names3[i]);
+ buf += sprintf(buf, "%s", var_names3[i]);
return buf;
} else if (g_options.scriptVersion >= 1 &&
i < ARRAYSIZE(var_names2) && var_names2[i]) {
- buf += sprintf(buf, var_names2[i]);
+ buf += sprintf(buf, "%s", var_names2[i]);
return buf;
} else if (g_options.scriptVersion == 0 &&
i < ARRAYSIZE(var_names0) && var_names0[i]) {
- buf += sprintf(buf, var_names0[i]);
+ buf += sprintf(buf, "%s", var_names0[i]);
return buf;
} else if (g_options.scriptVersion <= 2 && g_options.ZakFlag && (i == 234 || i == 235)) {
buf += sprintf(buf, (i == 234) ? "ZERO" : "ONE");
@@ -983,7 +983,7 @@
else
buf += sprintf(buf, "nuke");
assert(0 <= type && type < ARRAYSIZE(resTypes));
- buf += sprintf(buf, resTypes[type]);
+ buf += sprintf(buf, "%s", resTypes[type]);
buf += sprintf(buf, "(%s)", resid);
} else {
if (subop & 1)
@@ -991,7 +991,7 @@
else
buf += sprintf(buf, "unlock");
assert(0 <= type && type < ARRAYSIZE(resTypes));
- buf += sprintf(buf, resTypes[type]);
+ buf += sprintf(buf, "%s", resTypes[type]);
buf += sprintf(buf, "(%s)", resid);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list