tools/bin2cpp: Fix 64-bit warnings

This commit is contained in:
Connor McLaughlin 2021-10-01 17:21:48 +10:00 committed by Kojin
parent 8e1470f637
commit 928bf71d2a
1 changed files with 3 additions and 3 deletions

View File

@ -105,8 +105,8 @@ int main(int argc, char* argv[])
strcpy(srcfile,argv[ARG_SRCFILE]);
int srcfn_len = strlen( srcfile );
if( srcfile[srcfn_len-4] != '.' )
const size_t srcfn_len = strlen( srcfile );
if( srcfn_len < 4 || srcfile[srcfn_len-4] != '.' )
{
printf( "ERROR : Malformed source filename. I'm a crap utility and I demand 3-letter extensions only!\n" );
return 18;
@ -166,7 +166,7 @@ int main(int argc, char* argv[])
}
{
int len = strlen(fnameonly);
int len = static_cast<int>(strlen(fnameonly));
const char* fnlast = &fnameonly[len];
while( --fnlast, --len, (len >= 0 && (*fnlast != '/')) );