mirror of
https://git.suyu.dev/suyu/flatpak.git
synced 2026-01-04 21:54:53 +01:00
Init
This commit is contained in:
commit
e571c4fbe8
139 changed files with 8839 additions and 0 deletions
21
shared-modules/pygame/audiofile-gcc6.patch
Normal file
21
shared-modules/pygame/audiofile-gcc6.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
From b62c902dd258125cac86cd2df21fc898035a43d3 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Pruett <michael@68k.org>
|
||||
Date: Mon, 29 Aug 2016 23:08:26 -0500
|
||||
Subject: [PATCH] Fix undefined behavior in sign conversion.
|
||||
Origin: https://github.com/mpruett/audiofile/commit/b62c902dd258125cac86cd2df21fc898035a43d3
|
||||
|
||||
---
|
||||
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<Format>::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<SignedType, UnsignedType>
|
||||
{
|
||||
Loading…
Add table
Add a link
Reference in a new issue