Fix client status widget returning too big a 'used height'.

This commit is contained in:
UnknownShadow200 2016-05-09 08:46:04 +10:00
parent 60111bcbf2
commit 7427c56e19

View file

@ -90,15 +90,11 @@ namespace ClassicalSharp.Gui {
}
public int GetUsedHeight() {
int sum = 0, max = Textures.Length;
int sum = 0;
for( int i = 0; i < Textures.Length; i++ ) {
if( Textures[i].IsValid ) {
max = i; break;
}
}
for( int i = max; i < Textures.Length; i++ )
if( !Textures[i].IsValid ) continue;
sum += Textures[i].Height;
}
return sum;
}