mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 21:52:59 +00:00 
			
		
		
		
	Merge pull request #259 from SquidDev-CC/hotfix/check-palette
Add some sanity checks to Palette.readFromNBT
This commit is contained in:
		| @@ -89,8 +89,11 @@ public class Palette | ||||
|  | ||||
|     public void readFromNBT( NBTTagCompound nbt ) | ||||
|     { | ||||
|         if( !nbt.hasKey( "term_palette" ) ) return; | ||||
|         int[] rgb8 = nbt.getIntArray( "term_palette" ); | ||||
|  | ||||
|         if( rgb8.length != colours.length ) return; | ||||
|  | ||||
|         for(int i = 0; i < colours.length; ++i) | ||||
|         { | ||||
|             colours[i] = decodeRGB8( rgb8[i] ); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Daniel Ratcliffe
					Daniel Ratcliffe