From 768dd51e74b8e2d8d06081bce2657befc8ace708 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 22 Jun 2008 16:31:48 +0000 Subject: [PATCH] Corrected two while loops (they should have been plain if-statements, not loops). --- Source/Utilities/Fonts/TextPrinter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Utilities/Fonts/TextPrinter.cs b/Source/Utilities/Fonts/TextPrinter.cs index c9f80b45..83e07162 100644 --- a/Source/Utilities/Fonts/TextPrinter.cs +++ b/Source/Utilities/Fonts/TextPrinter.cs @@ -182,10 +182,10 @@ namespace OpenTK.Graphics if (wordWarp || rightToLeft || alignment != StringAlignment.Near) throw new NotImplementedException(); - while (8 * text.Length > vertices.Length) + if (8 * text.Length > vertices.Length) vertices = new Vector2[Math.Functions.NextPowerOfTwo(8 * text.Length)]; - while (6 * text.Length > indices.Length) + if (6 * text.Length > indices.Length) indices = new ushort[Math.Functions.NextPowerOfTwo(6 * text.Length)]; num_indices = 6 * text.Length;