mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
BACKENDS/GRAPHICS: Silence non zero-terminated terminated buffers warnings by initializing the buffers to 0
This commit is contained in:
parent
367605d774
commit
8a5bda72cc
@ -413,6 +413,7 @@ void OSystem_SDL::setupIcon() {
|
||||
for (i = 0; i < ncols; i++) {
|
||||
unsigned char code;
|
||||
char color[32];
|
||||
memset(color, 0, sizeof(color));
|
||||
unsigned int col;
|
||||
if (sscanf(scummvm_icon[1 + i], "%c c %s", &code, color) != 2) {
|
||||
warning("Wrong format of scummvm_icon[%d] (%s)", 1 + i, scummvm_icon[1 + i]);
|
||||
|
@ -214,6 +214,8 @@ int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf) {
|
||||
char buf[256];
|
||||
char facename[256];
|
||||
char copyright[256];
|
||||
memset(facename, 0, sizeof(facename));
|
||||
memset(copyright, 0, sizeof(copyright));
|
||||
|
||||
/* set certain values to errors for later error checking*/
|
||||
pf->defaultchar = -1;
|
||||
@ -235,6 +237,7 @@ int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf) {
|
||||
warning("Error: bad 'FONT'");
|
||||
return 0;
|
||||
}
|
||||
|
||||
pf->facename = strdup(facename);
|
||||
continue;
|
||||
}
|
||||
@ -243,6 +246,7 @@ int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf) {
|
||||
warning("Error: bad 'COPYRIGHT'");
|
||||
return 0;
|
||||
}
|
||||
|
||||
pf->copyright = strdup(copyright);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user