1
0
Fork 0

Fix compiler warning

(access beyond array bounds)
This commit is contained in:
ThorstenB 2012-07-06 08:28:45 +02:00
parent 0b9adf8854
commit ec739a17c2
2 changed files with 7 additions and 5 deletions

View file

@ -66,10 +66,11 @@ const GuiFont guifonts[] = {
{ "HELVETICA_12", &FONT_HELVETICA_12 }, { "HELVETICA_12", &FONT_HELVETICA_12 },
{ "HELVETICA_14", &FONT_HELVETICA_14 }, { "HELVETICA_14", &FONT_HELVETICA_14 },
{ "HELVETICA_18", &PUFONT_HELVETICA_18 }, { "HELVETICA_18", &PUFONT_HELVETICA_18 },
{ "SANS_12B", &FONT_SANS_12B } { "SANS_12B", &FONT_SANS_12B },
{ 0 }
}; };
const GuiFont* guifontsEnd = &guifonts[sizeof(guifonts)/ sizeof(guifonts[0])]; const GuiFont* guifontsEnd = &guifonts[sizeof(guifonts)/ sizeof(guifonts[0])-1];
} }
FGFontCache::FGFontCache() : FGFontCache::FGFontCache() :

View file

@ -66,11 +66,12 @@ const GuiFont guifonts[] = {
{ "HELVETICA_10", &PUFONT_HELVETICA_10 }, { "HELVETICA_10", &PUFONT_HELVETICA_10 },
{ "HELVETICA_12", &PUFONT_HELVETICA_12 }, { "HELVETICA_12", &PUFONT_HELVETICA_12 },
// { "HELVETICA_14", &FONT_HELVETICA_14 }, // { "HELVETICA_14", &FONT_HELVETICA_14 },
{ "HELVETICA_18", &PUFONT_HELVETICA_18 } { "HELVETICA_18", &PUFONT_HELVETICA_18 },
// { "SANS_12B", &FONT_SANS_12B } // { "SANS_12B", &FONT_SANS_12B },
{ 0 }
}; };
const GuiFont* guifontsEnd = &guifonts[sizeof(guifonts)/ sizeof(guifonts[0])]; const GuiFont* guifontsEnd = &guifonts[sizeof(guifonts)/ sizeof(guifonts[0])-1];
} }
FGFontCache::fnt::~fnt() FGFontCache::fnt::~fnt()