[xye] 01/02: Add patch fixing narrowing conversion
Andreas Rönnquist
gusnan at moszumanska.debian.org
Wed Jan 20 17:53:20 UTC 2016
This is an automated email from the git hooks/post-receive script.
gusnan pushed a commit to annotated tag debian/0.12.2+dfsg-5
in repository xye.
commit 32b4dd080ef6081e4aecf9f29f9c215e9fe26b02
Author: Andreas Rönnquist <gusnan at debian.org>
Date: Wed Jan 20 17:49:22 2016 +0100
Add patch fixing narrowing conversion
---
debian/patches/fix_narrowing_conversion.patch | 23 +++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 24 insertions(+)
diff --git a/debian/patches/fix_narrowing_conversion.patch b/debian/patches/fix_narrowing_conversion.patch
new file mode 100644
index 0000000..000c098
--- /dev/null
+++ b/debian/patches/fix_narrowing_conversion.patch
@@ -0,0 +1,23 @@
+Author: Andreas Rönnquist
+Description: Fix narrowing conversion
+ Fixes narrowing conversion which makes gcc-6 choke - we cannot store an -1
+ in a unsigned variable.
+--- a/src/xsb_level.cpp
++++ b/src/xsb_level.cpp
+@@ -784,14 +784,14 @@
+
+ bool FromXyeDFS(int* mem, unsigned char x, unsigned char y)
+ {
+- static const unsigned char dx[4] = {0,0,-1,1}, dy[4] = {-1,1,0,0};
++ static const int dx[4] = {0,0,-1,1}, dy[4] = {-1,1,0,0};
+ int &res = mem[y*XYE_HORZ+x];
+ if( res==0)
+ {
+ res = 1;
+ for (int t=0; t<4; t++)
+ {
+- unsigned char nx = x+dx[t], ny=y+dy[t];
++ int nx = x+dx[t], ny=y+dy[t];
+ if ( (nx<XYE_HORZ) && (ny<XYE_VERT)
+ && (( game::Square(x,y)->object == NULL) || ( game::Square(x,y)->object->GetType() == OT_BLOCK))
+ )
diff --git a/debian/patches/series b/debian/patches/series
index 852e200..7728090 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ fix_desktop_file.diff
fix_sigabrt_on_string_length_error.patch
fix_segfault_on_wrong_folder_argument.patch
fix_double_separators_in_folder.patch
+fix_narrowing_conversion.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/xye.git
More information about the Pkg-games-commits
mailing list