Skip to content

Commit

Permalink
Fix mipSize being wrong when replacing a texture
Browse files Browse the repository at this point in the history
  • Loading branch information
aboood40091 committed Dec 18, 2018
1 parent 2a08d56 commit a9260cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bfres.py
Expand Up @@ -380,6 +380,7 @@ def inject(tex, tileMode, swizzle_, SRGB, importMips, oldImageSize, oldMipSize,
mipSize += surfInfo.surfSize + len(dataAlignBytes)

if mipSize > oldMipSize:
mipSize -= surfInfo.surfSize + len(dataAlignBytes)
break

result.append(bytearray(dataAlignBytes) + addrlib.swizzle(
Expand Down

0 comments on commit a9260cf

Please sign in to comment.