mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Clean up a couple of warnings.
This commit is contained in:
@@ -6,7 +6,7 @@ static void AppendHex( std::string& str, int value, int width ) {
|
||||
eeASSERT( width > 0 && width < 64 );
|
||||
|
||||
char buffer[64];
|
||||
std::sprintf( buffer, "%0*X", width, value );
|
||||
std::snprintf( buffer, 64, "%0*X", width, value );
|
||||
str.append( buffer );
|
||||
}
|
||||
|
||||
|
||||
@@ -183,9 +183,8 @@ std::string MD5::hexDigest( std::vector<Uint8>& digest ) {
|
||||
char buf[33];
|
||||
size_t size = digest.size();
|
||||
|
||||
for ( size_t i = 0; i < size; i++ ) {
|
||||
sprintf( buf + i * 2, "%02x", digest[i] );
|
||||
}
|
||||
for ( size_t i = 0; i < size; i++ )
|
||||
snprintf( buf + i * 2, size - i + 2, "%02x", digest[i] );
|
||||
|
||||
buf[32] = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user