From 93c8122f7662873f69e6c6ab41a3b18d81c8773f Mon Sep 17 00:00:00 2001 From: Kimball Thurston Date: Fri, 22 Mar 2024 12:23:28 +1300 Subject: [PATCH] Fix typo causing prefix len to be wrong (#1684) When constructing the decompress side of dwaa/b compression support, simple typo when computing the prefix length as distance between pointers causing the length to be wrong, triggering csc decompression values to be wrong when decompressed. Signed-off-by: Kimball Thurston --- src/lib/OpenEXRCore/internal_dwa_compressor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/OpenEXRCore/internal_dwa_compressor.h b/src/lib/OpenEXRCore/internal_dwa_compressor.h index fbabe936ea..aa5a44a8ef 100644 --- a/src/lib/OpenEXRCore/internal_dwa_compressor.h +++ b/src/lib/OpenEXRCore/internal_dwa_compressor.h @@ -1693,7 +1693,7 @@ DwaCompressor_classifyChannels (DwaCompressor* me) prefixMap, me->_numChannels, curc->channel_name, - (size_t) (curc->channel_name - suffix)); + (size_t) (suffix - curc->channel_name)); for (size_t i = 0; i < me->_channelRuleCount; ++i) {