mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
0a498f3afe
in ${PREFIX}/. Users can still create levels in their directories if the file name has a /. Golddig is now setgid games so that it can update the score file (the file is no more world writable)
27 lines
801 B
Plaintext
27 lines
801 B
Plaintext
--- shared.c.orig Mon May 1 18:20:48 2000
|
|
+++ shared.c Mon May 1 18:25:28 2000
|
|
@@ -58,7 +58,7 @@
|
|
#include "bitmap/window.bits"
|
|
#include "bitmap/anti.bits"
|
|
|
|
-char *sprintf(); /* UNIX brain damage */
|
|
+/* char *sprintf(); /* UNIX brain damage */
|
|
|
|
/* All in and out movements except up */
|
|
#define NOUPBITS DLEAVE | LLEAVE | RLEAVE | HENTER | VENTER
|
|
@@ -316,8 +316,12 @@
|
|
|
|
/* Manufaction the file name by starting with the world name and */
|
|
/* appending the level number to it. */
|
|
- strcpy(filename,LIB);
|
|
- strcat(filename,"/");
|
|
+ if (strchr (worldname, '/'))
|
|
+ *filename = 0;
|
|
+ else {
|
|
+ strcpy(filename,LIB);
|
|
+ strcat(filename,"/");
|
|
+ }
|
|
strcat(filename,worldname);
|
|
sprintf(filename + strlen(filename),"%03d",levelnum);
|
|
/* Open level file for reading */
|