mirror of
https://github.com/raysan5/raylib.git
synced 2025-11-15 06:48:40 +00:00
Minor tweaks to avoid some CodeQL warnings
This commit is contained in:
@@ -362,7 +362,7 @@ static int screenshotCounter = 0; // Screenshots counter
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SUPPORT_GIF_RECORDING)
|
#if defined(SUPPORT_GIF_RECORDING)
|
||||||
int gifFrameCounter = 0; // GIF frames counter
|
unsigned int gifFrameCounter = 0; // GIF frames counter
|
||||||
bool gifRecording = false; // GIF recording state
|
bool gifRecording = false; // GIF recording state
|
||||||
MsfGifState gifState = { 0 }; // MSGIF context state
|
MsfGifState gifState = { 0 }; // MSGIF context state
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
23
src/rtext.c
23
src/rtext.c
@@ -2264,23 +2264,12 @@ static Font LoadBMFont(const char *fileName)
|
|||||||
#if defined(SUPPORT_FILEFORMAT_BDF)
|
#if defined(SUPPORT_FILEFORMAT_BDF)
|
||||||
|
|
||||||
// Convert hexadecimal to decimal (single digit)
|
// Convert hexadecimal to decimal (single digit)
|
||||||
static char HexToInt(char hex) {
|
static unsigned char HexToInt(char hex)
|
||||||
if (hex >= '0' && hex <= '9')
|
|
||||||
{
|
{
|
||||||
return hex - '0';
|
if (hex >= '0' && hex <= '9') return hex - '0';
|
||||||
}
|
else if (hex >= 'a' && hex <= 'f') return hex - 'a' + 10;
|
||||||
else if (hex >= 'a' && hex <= 'f')
|
else if (hex >= 'A' && hex <= 'F') return hex - 'A' + 10;
|
||||||
{
|
else return 0;
|
||||||
return hex - 'a' + 10;
|
|
||||||
}
|
|
||||||
else if (hex >= 'A' && hex <= 'F')
|
|
||||||
{
|
|
||||||
return hex - 'A' + 10;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load font data for further use
|
// Load font data for further use
|
||||||
@@ -2365,7 +2354,7 @@ static GlyphInfo *LoadFontDataBDF(const unsigned char *fileData, int dataSize, i
|
|||||||
|
|
||||||
for (int x = 0; x < readBytes; x++)
|
for (int x = 0; x < readBytes; x++)
|
||||||
{
|
{
|
||||||
char byte = HexToInt(buffer[x]);
|
unsigned char byte = HexToInt(buffer[x]);
|
||||||
|
|
||||||
for (int bitX = 0; bitX < 4; bitX++)
|
for (int bitX = 0; bitX < 4; bitX++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user