From 1b3527f8de1949621964e8de40ea5a4caeab97fc Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sun, 9 May 2010 14:15:43 +1200 Subject: [PATCH] workaround broken int promotion in gmcs --- OpenRA.Editor/Surface.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Editor/Surface.cs b/OpenRA.Editor/Surface.cs index dcee4fb1d8..359ff4a938 100644 --- a/OpenRA.Editor/Surface.cs +++ b/OpenRA.Editor/Surface.cs @@ -121,7 +121,7 @@ namespace OpenRA.Editor var tr = Map.MapTiles[u * ChunkSize + i, v * ChunkSize + j]; var tile = TileSet.tiles[tr.type]; - var index = (tr.index < tile.TileBitmapBytes.Count) ? tr.index : 0; + var index = (tr.index < tile.TileBitmapBytes.Count) ? tr.index : (byte)0; var rawImage = tile.TileBitmapBytes[index]; for (var x = 0; x < 24; x++) for (var y = 0; y < 24; y++)