Skip to content

Commit 3f14dea

Browse files
committed
Visual Studio 2022 (v143) compiler bug workaround. Test works now. Only impacted this compiler, not v142 or clang/gcc.
1 parent 80a07ff commit 3f14dea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

encoder/basisu_enc.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,11 +1312,13 @@ namespace basisu
13121312

13131313
uint32_t a = max_index / num_syms, b = max_index % num_syms;
13141314

1315+
const uint32_t ofs = m_entries_picked.size();
1316+
13151317
m_entries_picked.push_back(a);
13161318
m_entries_picked.push_back(b);
13171319

13181320
for (uint32_t i = 0; i < num_syms; i++)
1319-
if ((i != b) && (i != a))
1321+
if ((i != m_entries_picked[ofs + 1]) && (i != m_entries_picked[ofs]))
13201322
m_entries_to_do.push_back(i);
13211323

13221324
for (uint32_t i = 0; i < m_entries_to_do.size(); i++)

0 commit comments

Comments
 (0)