From cb7229f334b069fee8dd67c73f6a8dfc6c2b228a Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Fri, 19 Aug 2016 10:27:26 +0700 Subject: [PATCH] little bits tag fix --- .../Internal/Editor/SwfTools/SwfTags/DefineBitsLossless2Tag.cs | 2 +- .../Internal/Editor/SwfTools/SwfTags/DefineBitsLosslessTag.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTags/DefineBitsLossless2Tag.cs b/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTags/DefineBitsLossless2Tag.cs index a868b7f..e0a3e58 100644 --- a/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTags/DefineBitsLossless2Tag.cs +++ b/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTags/DefineBitsLossless2Tag.cs @@ -31,7 +31,7 @@ namespace FlashTools.Internal.SwfTools.SwfTags { tag.BitmapWidth = reader.ReadUInt16(); tag.BitmapHeight = reader.ReadUInt16(); if ( tag.BitmapFormat == 3 ) { - tag.BitmapColorTableSize = reader.ReadByte(); + tag.BitmapColorTableSize = reader.ReadByte() + 1; } tag.ZlibBitmapData = reader.ReadRest(); return tag; diff --git a/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTags/DefineBitsLosslessTag.cs b/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTags/DefineBitsLosslessTag.cs index f43a8dc..0365882 100644 --- a/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTags/DefineBitsLosslessTag.cs +++ b/Assets/FlashTools/Scripts/Internal/Editor/SwfTools/SwfTags/DefineBitsLosslessTag.cs @@ -31,7 +31,7 @@ namespace FlashTools.Internal.SwfTools.SwfTags { tag.BitmapWidth = reader.ReadUInt16(); tag.BitmapHeight = reader.ReadUInt16(); if ( tag.BitmapFormat == 3 ) { - tag.BitmapColorTableSize = reader.ReadByte(); + tag.BitmapColorTableSize = reader.ReadByte() + 1; } tag.ZlibBitmapData = reader.ReadRest(); return tag;