diff --git a/src/Magnum/TextureTools/Atlas.cpp b/src/Magnum/TextureTools/Atlas.cpp index d38c49e40..da0547d86 100644 --- a/src/Magnum/TextureTools/Atlas.cpp +++ b/src/Magnum/TextureTools/Atlas.cpp @@ -192,7 +192,7 @@ bool atlasLandfillAddSortedFlipped(Implementation::AtlasLandfillState& state, co AtlasLandfill::AtlasLandfill(const Vector3i& size):_state{InPlaceInit} { CORRADE_ASSERT(size.x(), "TextureTools::AtlasLandfill: expected non-zero width, got" << Debug::packed << size, ); CORRADE_ASSERT(size.y() || size.z() == 1, "TextureTools::AtlasLandfill: expected a single array slice for unbounded height, got" << Debug::packed << size, ); - CORRADE_ASSERT(size.x() <= 65536, "TextureTools::AtlasLandfill: expected width to fit into 16 bits, got" << Debug::packed << size, ); + CORRADE_ASSERT(size.y() <= 65536, "TextureTools::AtlasLandfill: expected height to fit into 16 bits, got" << Debug::packed << size, ); /* Change y / z = 0 to y / z = MAX so the algorithm doesn't need to branch on that internally */ diff --git a/src/Magnum/TextureTools/Test/AtlasTest.cpp b/src/Magnum/TextureTools/Test/AtlasTest.cpp index bfe6870b6..6ddc62e8c 100644 --- a/src/Magnum/TextureTools/Test/AtlasTest.cpp +++ b/src/Magnum/TextureTools/Test/AtlasTest.cpp @@ -979,23 +979,23 @@ void AtlasTest::landfillInvalidSize() { /* These are fine */ AtlasLandfill{{16, 0}}; - AtlasLandfill{{65536, 16}}; + AtlasLandfill{{16, 65536}}; AtlasLandfill{{16, 16, 0}}; - AtlasLandfill{{65536, 16, 16}}; + AtlasLandfill{{16, 65536, 16}}; std::ostringstream out; Error redirectError{&out}; AtlasLandfill{{0, 16}}; - AtlasLandfill{{65537, 16}}; + AtlasLandfill{{16, 65537}}; AtlasLandfill{{0, 16, 16}}; AtlasLandfill{{16, 0, 16}}; - AtlasLandfill{{65537, 16, 16}}; + AtlasLandfill{{16, 65537, 16}}; CORRADE_COMPARE_AS(out.str(), "TextureTools::AtlasLandfill: expected non-zero width, got {0, 16, 1}\n" - "TextureTools::AtlasLandfill: expected width to fit into 16 bits, got {65537, 16, 1}\n" + "TextureTools::AtlasLandfill: expected height to fit into 16 bits, got {16, 65537, 1}\n" "TextureTools::AtlasLandfill: expected non-zero width, got {0, 16, 16}\n" "TextureTools::AtlasLandfill: expected a single array slice for unbounded height, got {16, 0, 16}\n" - "TextureTools::AtlasLandfill: expected width to fit into 16 bits, got {65537, 16, 16}\n", + "TextureTools::AtlasLandfill: expected height to fit into 16 bits, got {16, 65537, 16}\n", TestSuite::Compare::String); }