Unbreak build on gcc-4.2.1

Noticed by and ok naddy@
This commit is contained in:
bcallah 2018-04-28 18:11:32 +00:00
parent f5e7bcdd72
commit 40752a8902
2 changed files with 17 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.6 2018/04/08 19:17:14 bcallah Exp $
# $OpenBSD: Makefile,v 1.7 2018/04/28 18:11:32 bcallah Exp $
COMMENT = puzzle game collecting diamonds and avoiding obstacles
DISTNAME = xye-0.12.2
@ -22,6 +22,4 @@ RUN_DEPENDS = devel/desktop-file-utils
CONFIGURE_STYLE = gnu
CXXFLAGS += -std=c++03
.include <bsd.port.mk>

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_xsb_level_cpp,v 1.1 2018/04/28 18:11:32 bcallah Exp $
clang6 fix
Index: src/xsb_level.cpp
--- src/xsb_level.cpp.orig
+++ src/xsb_level.cpp
@@ -784,7 +784,7 @@ return false;
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 unsigned char dx[4] = {0,0,255,1}, dy[4] = {255,1,0,0};
int &res = mem[y*XYE_HORZ+x];
if( res==0)
{