Note the Kitten Cannon oversized-texture case

Homebrew "Kitten Cannon" hits the bad-dimensions path with a clearly invalid
512x32768 texture, likely a noise bit in the texture size command.
This commit is contained in:
Henrik Rydgård committed 2026-08-29 11:42:47 +02:00
1 parent 4e3bda639e
commit 4d26523ba8
1 file changed
+2
+2
View File
@@ -2863,6 +2863,8 @@ bool TextureCacheCommon::PrepareBuildTexture(BuildTexturePlan &plan, TexCacheEnt
// These will only work correctly in the top 512x512 part. So, I've increased the threshold quite a bit.
// We probably should handle these differently, by clamping the texture size and texture coordinates, but meh.
if (plan.w > 2048 || plan.h > 2048) {
// Strangely, the homebrew "Kitten Cannon" hits this a bunch, with a clearly invalid 512x32768 texture.
// Some noise bit in the texture size command that we might just want to ignore.
ERROR_LOG(Log::TexCache, "Bad texture dimensions: %dx%d", plan.w, plan.h);
return false;
}