mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-24 09:42:13 +00:00
- Silence GCC warning in RTS_IsInitialized()
.
/home/mrichters/Repos/Raze/source/core/rts.cpp: In function ‘bool RTS_IsInitialized()’: /home/mrichters/Repos/Raze/source/core/rts.cpp:123:51: warning: ‘.rts’ directive output may be truncated writing 4 bytes into a region of size between 3 and 11 [-Wformat-truncation=] 123 | snprintf(rts, 16, "rts%02d.rts", i); | ^~~~ /home/mrichters/Repos/Raze/source/core/rts.cpp:123:33: note: ‘snprintf’ output between 10 and 18 bytes into a destination of size 16 123 | snprintf(rts, 16, "rts%02d.rts", i); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
91a05d01d2
commit
ce03797949
1 changed files with 2 additions and 2 deletions
|
@ -119,8 +119,8 @@ bool RTS_IsInitialized()
|
|||
{
|
||||
if (li.size > 0)
|
||||
{
|
||||
char rts[16];
|
||||
snprintf(rts, 16, "rts%02d.rts", i);
|
||||
char rts[18];
|
||||
snprintf(rts, 18, "rts%02d.rts", i);
|
||||
int lump = fileSystem.AddFromBuffer(rts, (char*)RTSFile.Data() + li.position, li.size, -1, 0);
|
||||
li.sid = soundEngine->AddSoundLump(rts, lump, 0, -1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue