opnsense-ports/games/0verkill/files/patch-sprite.c
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

25 lines
535 B
C

--- sprite.c.orig 2001-12-15 20:51:53.000000000 +0300
+++ sprite.c 2013-11-17 13:00:40.184048213 +0400
@@ -2,6 +2,7 @@
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
+#include <unistd.h>
#ifndef WIN32
#include "config.h"
@@ -188,6 +189,14 @@
if (!(f=fopen(filename,"rb")))
{
+ chdir(DATA_PATH);
+ }
+ if (!(f=fopen(filename,"rb")))
+ {
+ chdir(DATA_PATH "/../");
+ }
+ if (!(f=fopen(filename,"rb")))
+ {
unsigned char msg[256];
snprintf(msg,256,"Error opening file \"%s\"!\n",filename);
ERROR(msg);