From 55bff4c5185a137b39b1d1411d0bedeb90e25e6d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 15 Sep 2003 07:15:36 +0000 Subject: [PATCH] Fix warnings, fix crash, add asserts. --- stepmania/src/BitmapText.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stepmania/src/BitmapText.cpp b/stepmania/src/BitmapText.cpp index c9a626f56f..6b2d4f33f2 100644 --- a/stepmania/src/BitmapText.cpp +++ b/stepmania/src/BitmapText.cpp @@ -208,9 +208,11 @@ void BitmapText::BuildChars() void BitmapText::DrawChars() { unsigned uNumGlyphs = tex.size(); - unsigned uStartGlyph = SCALE( m_temp.crop.left, 0.f, 1.f, 0, uNumGlyphs ); - unsigned uEndGlyph = SCALE( m_temp.crop.right, 0.f, 1.f, uNumGlyphs, 0 ); + unsigned uStartGlyph = (unsigned) SCALE( m_temp.crop.left, 0.f, 1.f, 0, (float) uNumGlyphs ); + unsigned uEndGlyph = (unsigned) SCALE( m_temp.crop.right, 0.f, 1.f, (float) uNumGlyphs, 0 ); + ASSERT( uStartGlyph <= uNumGlyphs ); + ASSERT( uEndGlyph <= uNumGlyphs ); for(unsigned start = uStartGlyph; start < uEndGlyph; ) { unsigned end = start;