瀏覽代碼

Fixed crash with no newline at start of atlas.

NathanSweet 12 年之前
父節點
當前提交
e1b7b713a2
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      spine-csharp/src/Atlas.cs

+ 2 - 3
spine-csharp/src/Atlas.cs

@@ -62,13 +62,12 @@ namespace Spine {
 			float invTexHeight = 1f / textureHeight;
 			float invTexHeight = 1f / textureHeight;
 			String[] tuple = new String[4];
 			String[] tuple = new String[4];
 
 
-			// Skip to first page entry.
+			// Skip past first page name.
 			while (true) {
 			while (true) {
 				String line = reader.ReadLine();
 				String line = reader.ReadLine();
-				if (line.Trim().Length == 0)
+				if (line.Trim().Length != 0)
 					break;
 					break;
 			}
 			}
-			reader.ReadLine(); // Skip first page name.
 
 
 			Format = (Format)Enum.Parse(typeof(Format), readValue(reader), false);
 			Format = (Format)Enum.Parse(typeof(Format), readValue(reader), false);