Index: x11.c
--- x11.c.orig
+++ x11.c
@@ -33,6 +33,7 @@
 
 #ifdef USE_X11
 
+#include <sys/stat.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <X11/Xos.h>
@@ -52,8 +53,8 @@
 #ifdef __unix
 
 #define MAXSCORES 10		/* number of entries in high score table */
-#define PATH_HIGHSCORE XONIXDIR "/scores"
-#define PATH_TEMPSCORE XONIXDIR "/score_tmp"
+#define PATH_HIGHSCORE "/var/games/xonix/xonix.scores"
+#define PATH_TEMPSCORE "/var/games/xonix/xonix.score_tmp"
 
 #if defined(__unix) && !defined PATH_RMAIL
 #define PATH_RMAIL "rmail"	/* rely on the $PATH */
@@ -114,6 +115,9 @@
 
 #include "xonix.h"
 
+/* OpenBSD: set[ug]id binary MUST say so in this var */
+mode_t _permit_setugid = S_ISGID;
+
 #define ApplicationClassName "Xonix"
 
 #define trans_table \
@@ -336,6 +340,8 @@ XonixEventHandler(Widget w,      /* canvas */
       if(y0 < 0) y0 = 0;
       x1 = ((exp->x + exp->width + EATER_SIZE - 1) / EATER_SIZE) | 1;
       y1 = ((exp->y + exp->height + EATER_SIZE - 1) / EATER_SIZE) | 1;
+      if(x1 > H_STEPS) x1 = H_STEPS;
+      if(y1 > V_STEPS) y1 = V_STEPS;
       for(j = y0; j < y1; j += 2)
 	for(i = x0; i < x1; i += 2) {
 	  unsigned char c = *(gMyStatusArea + (j * H_STEPS) + i);
