1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Fix several format errors detected via vararg-template voodoo

This commit is contained in:
2013-12-16 18:36:34 -08:00
parent 09cc4b8259
commit 56507c5219
7 changed files with 14 additions and 10 deletions

View File

@ -493,7 +493,7 @@ void plFont::IRenderString( plMipmap *mip, uint16_t x, uint16_t y, const wcha
break;
}
// Are we a uint16_t breaker?
// Are we a word breaker?
if( IIsWordBreaker( (char)(string[ i ]) ) )
{
if (string[i] == '.') // we might have an ellipsis here

View File

@ -2177,10 +2177,13 @@ void plMipmap::IReportLeaks()
for( record = fRecords; record != nil; )
{
size = record->fHeight * record->fRowBytes;
if( size >= 1024 )
sprintf( msg, "%s, %4.1f kB: \t%dx%d, %d levels, %d bpr", record->fKeyName, size / 1024.f, record->fWidth, record->fHeight, record->fNumLevels, record->fRowBytes );
else
sprintf( msg, "%s, %u bytes: \t%dx%d, %d levels, %d bpr", record->fKeyName, size, record->fWidth, record->fHeight, record->fNumLevels, record->fRowBytes );
if (size >= 1024) {
sprintf(msg, "%s, %4.1f kB: \t%dx%d, %d levels, %d bpr", record->fKeyName.c_str(),
size / 1024.f, record->fWidth, record->fHeight, record->fNumLevels, record->fRowBytes);
} else {
sprintf(msg, "%s, %u bytes: \t%dx%d, %d levels, %d bpr", record->fKeyName.c_str(),
size, record->fWidth, record->fHeight, record->fNumLevels, record->fRowBytes);
}
if( record->fCompressionType != kDirectXCompression )
sprintf( m2, " UType: %d", record->fUncompressedInfo.fType );