Skip to content

Commit

Permalink
Removed upper limit on Mip texture dimensions.
Browse files Browse the repository at this point in the history
Signed-off-by: Kristian Duske <[email protected]>
  • Loading branch information
kduske committed Sep 23, 2013
1 parent 3c3b030 commit a8e24af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Mac/TrenchBroom/TrenchBroom-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2737</string>
<string>2738</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
Expand Down
4 changes: 1 addition & 3 deletions Source/IO/Wad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ namespace TrenchBroom {
static const unsigned int DirEntryNameLength = 16;
static const unsigned int PalLength = 256;
static const unsigned int TexWidthOffset = 16;
static const unsigned int MaxTextureSize = 512;
}

Mip* Wad::loadMip(const WadEntry& entry, unsigned int mipCount) const throw (IOException) {
Expand All @@ -47,8 +46,7 @@ namespace TrenchBroom {
unsigned int mip0Offset = readUnsignedInt<int32_t>(cursor);


if (width == 0 || height == 0 ||
width > WadLayout::MaxTextureSize || height > WadLayout::MaxTextureSize)
if (width == 0 || height == 0)
throw IOException("Invalid mip dimensions (%ix%i)", width, height);
if (mip0Offset + mip0Size > entry.length())
throw IOException("Mip data beyond wad entry");
Expand Down

0 comments on commit a8e24af

Please sign in to comment.