From: Good Guy Date: Sat, 6 Dec 2025 18:40:49 +0000 (-0700) Subject: Credit Rob/Andrew - found error bitshift of a negative value and patchfix for forced... X-Git-Url: https://git.cinelerra-gg.org/?a=commitdiff_plain;h=2774a39695b82e7b7ca9979fedba63ab0fd2ab89;p=goodguy%2Fcinelerra.git Credit Rob/Andrew - found error bitshift of a negative value and patchfix for forced build of audiofile --- diff --git a/cinelerra-5.1/audiofile-0.3.6.patch b/cinelerra-5.1/audiofile-0.3.6.patch new file mode 100644 index 00000000..40c2a5d8 --- /dev/null +++ b/cinelerra-5.1/audiofile-0.3.6.patch @@ -0,0 +1,14 @@ +diff --git a/libaudiofile/modules/SimpleModule.h b/libaudiofile/modules/SimpleModule.h +index 03c6c69..bad85ad 100644 +--- a/libaudiofile/modules/SimpleModule.h ++++ b/libaudiofile/modules/SimpleModule.h +@@ -123,7 +123,8 @@ struct signConverter + typedef typename IntTypes::UnsignedType UnsignedType; + + static const int kScaleBits = (Format + 1) * CHAR_BIT - 1; +- static const int kMinSignedValue = -1 << kScaleBits; ++ static const int kMaxSignedValue = (((1 << (kScaleBits - 1)) - 1) << 1) + 1; ++ static const int kMinSignedValue = -kMaxSignedValue - 1; + + struct signedToUnsigned : public std::unary_function + {