and now, coverity will be happy?
This commit is contained in:
parent
892059a346
commit
f8fe675e65
3 changed files with 7 additions and 7 deletions
|
|
@ -209,7 +209,7 @@ void Bot::PrepareChatMessage (char *text)
|
|||
else if (*pattern == 'r')
|
||||
{
|
||||
int time = static_cast <int> (g_timeRoundEnd - GetWorldTime ());
|
||||
strcat (m_tempStrings, FormatBuffer ("%02d:%02d", time / 60, time % 60));
|
||||
strncat (m_tempStrings, FormatBuffer ("%02d:%02d", time / 60, time % 60), SIZEOF_CHAR (m_tempStrings));
|
||||
}
|
||||
// chat reply?
|
||||
else if (*pattern == 's')
|
||||
|
|
@ -322,7 +322,7 @@ void Bot::PrepareChatMessage (char *text)
|
|||
strncpy (tempString, textStart, SIZEOF_CHAR (tempString));
|
||||
|
||||
HumanizeChat (tempString);
|
||||
strcat (m_tempStrings, tempString);
|
||||
strncat (m_tempStrings, tempString, SIZEOF_CHAR (m_tempStrings));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1222,7 +1222,7 @@ char *Localizer::TranslateInput (const char *input)
|
|||
if (ptr != input)
|
||||
ptr++;
|
||||
|
||||
strncpy (string, input, ARRAYSIZE_HLSDK (string));
|
||||
strncpy (string, input, SIZEOF_CHAR (string));
|
||||
strtrim (string);
|
||||
|
||||
FOR_EACH_AE (m_langTab, i)
|
||||
|
|
|
|||
|
|
@ -909,7 +909,7 @@ void Waypoint::InitExperienceTab (void)
|
|||
ExtensionHeader header;
|
||||
memset (&header, 0, sizeof (header));
|
||||
|
||||
if (fp.Read (&header, sizeof (ExtensionHeader)) == 0)
|
||||
if (fp.Read (&header, sizeof (header)) == 0)
|
||||
{
|
||||
AddLogEntry (true, LL_ERROR, "Experience data damaged (unable to read header)");
|
||||
|
||||
|
|
@ -1006,7 +1006,7 @@ void Waypoint::InitVisibilityTab (void)
|
|||
}
|
||||
|
||||
// read the header of the file
|
||||
if (fp.Read (&header, sizeof (ExtensionHeader)) == 0)
|
||||
if (fp.Read (&header, sizeof (header)) == 0)
|
||||
{
|
||||
AddLogEntry (true, LL_ERROR, "Vistable damaged (unable to read header)");
|
||||
|
||||
|
|
@ -1071,11 +1071,11 @@ bool Waypoint::Load (void)
|
|||
File fp (CheckSubfolderFile (), "rb");
|
||||
|
||||
WaypointHeader header;
|
||||
memset (&header, 0, sizeof (WaypointHeader));
|
||||
memset (&header, 0, sizeof (header));
|
||||
|
||||
if (fp.IsValid ())
|
||||
{
|
||||
if (fp.Read (&header, sizeof (WaypointHeader)) == 0)
|
||||
if (fp.Read (&header, sizeof (header)) == 0)
|
||||
{
|
||||
sprintf (m_infoBuffer, "%s.pwf - damaged waypoint file (unable to read header)", GetMapName ());
|
||||
AddLogEntry (true, LL_ERROR, m_infoBuffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue