Commit 5d8767fa authored by Richard Gobeille's avatar Richard Gobeille
Browse files

engine: fix bad format strings on a few loguru calls

parent 4df661db
......@@ -193,7 +193,7 @@ size_t buildprint(Args... args)
size_t const len = buildprint_internal__(buf, args...);
g_useLogCallback = false;
LOG_F(INFO, buf);
LOG_F(INFO, "%s", buf);
g_useLogCallback = true;
initputs(buf);
......
......@@ -338,7 +338,7 @@ void cache1d::report(void)
else
{
Bstrcat(buf, "FREE");
LOG_F(INFO, buf);
LOG_F(INFO, "%s", buf);
continue;
}
......@@ -373,7 +373,7 @@ void cache1d::report(void)
if (len < reportLineSize)
buf[len-1] = '\0';
LOG_F(INFO, buf);
LOG_F(INFO, "%s", buf);
}
LOG_F(INFO, "Cache size: %dKB", m_totalSize >> 10);
......
......@@ -2716,7 +2716,7 @@ static int32_t defsparser(scriptfile *script)
{
char *string = NULL;
scriptfile_getstring(script,&string);
LOG_F(INFO, string);
LOG_F(INFO, "%s", string);
}
break;
......
......@@ -1712,7 +1712,7 @@ int OSD_Printf(const char *f, ...)
EDUKE32_STATIC_ASSERT(loguru::Verbosity_ERROR == -2);
g_useLogCallback = false;
VLOG_F(isError ? (int)loguru::Verbosity_ERROR : (int)loguru::Verbosity_INFO, OSD_StripColors(buf, buf));
VLOG_F(isError ? (int)loguru::Verbosity_ERROR : (int)loguru::Verbosity_INFO, "%s", OSD_StripColors(buf, buf));
Xfree(buf);
g_useLogCallback = true;
......
......@@ -685,7 +685,7 @@ int32_t sdlayer_checkversion(void)
linked.major, linked.minor, linked.patch, compiled.major, compiled.minor, compiled.patch);
}
LOG_F(INFO, str);
LOG_F(INFO, "%s", str);
if (SDL_VERSIONNUM(linked.major, linked.minor, linked.patch) < SDL2_REQUIREDVERSION)
{
......
......@@ -759,9 +759,9 @@ static int osdcmd_crosshaircolor(osdcmdptr_t parm)
uint8_t const b = Batol(parm->parms[2]);
G_SetCrosshairColor(r,g,b);
if (!OSD_ParsingScript())
LOG_F(INFO, parm->raw);
LOG_F(INFO, "%s", parm->raw);
return OSDCMD_OK;
}
......@@ -875,9 +875,9 @@ static int osdcmd_bind(osdcmdptr_t parm)
if (parm->numparms==1 && !Bstrcasecmp(parm->parms[0],"showkeys"))
{
for (auto & s : sctokeylut)
LOG_F(INFO, s.key);
LOG_F(INFO, "%s", s.key);
for (auto ConsoleButton : ConsoleButtons)
LOG_F(INFO, ConsoleButton);
LOG_F(INFO, "%s", ConsoleButton);
return OSDCMD_OK;
}
......@@ -947,7 +947,7 @@ static int osdcmd_bind(osdcmdptr_t parm)
CONTROL_BindMouse(i, tempbuf, repeat, ConsoleButtons[i]);
if (!OSD_ParsingScript())
LOG_F(INFO, parm->raw);
LOG_F(INFO, "%s", parm->raw);
return OSDCMD_OK;
}
......@@ -1012,7 +1012,7 @@ static int osdcmd_bind(osdcmdptr_t parm)
}
if (!OSD_ParsingScript())
LOG_F(INFO, parm->raw);
LOG_F(INFO, "%s", parm->raw);
return OSDCMD_OK;
}
......@@ -1145,7 +1145,7 @@ static int osdcmd_inittimer(osdcmdptr_t parm)
G_InitTimer(Batol(parm->parms[0]));
LOG_F(INFO, parm->raw);
LOG_F(INFO, "%s", parm->raw);
return OSDCMD_OK;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment