mirror of https://github.com/PCSX2/pcsx2.git
tools/bin2cpp: Fix 64-bit warnings
This commit is contained in:
parent
8e1470f637
commit
928bf71d2a
|
@ -105,8 +105,8 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
strcpy(srcfile,argv[ARG_SRCFILE]);
|
strcpy(srcfile,argv[ARG_SRCFILE]);
|
||||||
|
|
||||||
int srcfn_len = strlen( srcfile );
|
const size_t srcfn_len = strlen( srcfile );
|
||||||
if( srcfile[srcfn_len-4] != '.' )
|
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" );
|
printf( "ERROR : Malformed source filename. I'm a crap utility and I demand 3-letter extensions only!\n" );
|
||||||
return 18;
|
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];
|
const char* fnlast = &fnameonly[len];
|
||||||
while( --fnlast, --len, (len >= 0 && (*fnlast != '/')) );
|
while( --fnlast, --len, (len >= 0 && (*fnlast != '/')) );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue