Update the dgamelaunch compatibility patch.
The patch is now to be applied to dgamelaunch revision 6753fd6e. Maybe I should maintain my own Git branch. But this project already uses autotools and npm. I don't need any more software that's amazing in theory but painful to actually work with.
This commit is contained in:
parent
2f95935349
commit
42188c1934
1 changed files with 17 additions and 13 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
diff --git a/dgamelaunch.c b/dgamelaunch.c
|
diff --git a/dgamelaunch.c b/dgamelaunch.c
|
||||||
index fbf6ef5..b52b545 100644
|
index a52812d..6107851 100644
|
||||||
--- a/dgamelaunch.c
|
--- a/dgamelaunch.c
|
||||||
+++ b/dgamelaunch.c
|
+++ b/dgamelaunch.c
|
||||||
@@ -1489,7 +1489,10 @@ int
|
@@ -1489,7 +1489,10 @@ int
|
||||||
|
|
@ -43,17 +43,21 @@ index fbf6ef5..b52b545 100644
|
||||||
|
|
||||||
if (dowrite)
|
if (dowrite)
|
||||||
writefile (0);
|
writefile (0);
|
||||||
@@ -2053,6 +2076,8 @@ passwordgood (char *cpw)
|
@@ -2054,6 +2077,12 @@ passwordgood (char *cpw)
|
||||||
{
|
char *crypted;
|
||||||
assert (me != NULL);
|
assert (me != NULL);
|
||||||
|
|
||||||
+ if (!strncmp (crypt (cpw, me->password), me->password, DGL_PASSWDLEN))
|
+ crypted = crypt (cpw, me->password);
|
||||||
|
+ if (crypted == NULL)
|
||||||
|
+ return 0;
|
||||||
|
+ if (!strncmp (crypted, me->password, DGL_PASSWDLEN))
|
||||||
+ return 1;
|
+ return 1;
|
||||||
if (!strncmp (crypt (cpw, cpw), me->password, DGL_PASSWDLEN))
|
+
|
||||||
return 1;
|
crypted = crypt (cpw, cpw);
|
||||||
if (!strncmp (cpw, me->password, DGL_PASSWDLEN))
|
if (crypted == NULL)
|
||||||
|
return 0;
|
||||||
diff --git a/dgamelaunch.h b/dgamelaunch.h
|
diff --git a/dgamelaunch.h b/dgamelaunch.h
|
||||||
index b9ce41c..ca5e11b 100644
|
index e298adf..411c7c3 100644
|
||||||
--- a/dgamelaunch.h
|
--- a/dgamelaunch.h
|
||||||
+++ b/dgamelaunch.h
|
+++ b/dgamelaunch.h
|
||||||
@@ -20,7 +20,7 @@
|
@@ -20,7 +20,7 @@
|
||||||
|
|
@ -66,10 +70,10 @@ index b9ce41c..ca5e11b 100644
|
||||||
|
|
||||||
#define DGL_MAXWATCHCOLS 10
|
#define DGL_MAXWATCHCOLS 10
|
||||||
diff --git a/dgl-common.c b/dgl-common.c
|
diff --git a/dgl-common.c b/dgl-common.c
|
||||||
index e5c80bc..fbc4eea 100644
|
index 80560b5..94f7b69 100644
|
||||||
--- a/dgl-common.c
|
--- a/dgl-common.c
|
||||||
+++ b/dgl-common.c
|
+++ b/dgl-common.c
|
||||||
@@ -593,7 +593,7 @@ game_read_extra_info(struct dg_game *game, const char *extra_info_file)
|
@@ -608,7 +608,7 @@ game_read_extra_info(struct dg_game *game, const char *extra_info_file)
|
||||||
struct dg_game **
|
struct dg_game **
|
||||||
populate_games (int xgame, int *l, struct dg_user *me)
|
populate_games (int xgame, int *l, struct dg_user *me)
|
||||||
{
|
{
|
||||||
|
|
@ -78,7 +82,7 @@ index e5c80bc..fbc4eea 100644
|
||||||
DIR *pdir;
|
DIR *pdir;
|
||||||
struct dirent *pdirent;
|
struct dirent *pdirent;
|
||||||
struct stat pstat;
|
struct stat pstat;
|
||||||
@@ -631,13 +631,15 @@ populate_games (int xgame, int *l, struct dg_user *me)
|
@@ -646,13 +646,15 @@ populate_games (int xgame, int *l, struct dg_user *me)
|
||||||
|
|
||||||
if (!inprog) continue;
|
if (!inprog) continue;
|
||||||
|
|
||||||
|
|
@ -95,7 +99,7 @@ index e5c80bc..fbc4eea 100644
|
||||||
{
|
{
|
||||||
char *ttrecdir = NULL;
|
char *ttrecdir = NULL;
|
||||||
strncpy(playername, pdirent->d_name, DGL_PLAYERNAMELEN);
|
strncpy(playername, pdirent->d_name, DGL_PLAYERNAMELEN);
|
||||||
@@ -651,6 +653,9 @@ populate_games (int xgame, int *l, struct dg_user *me)
|
@@ -666,6 +668,9 @@ populate_games (int xgame, int *l, struct dg_user *me)
|
||||||
graceful_exit(145);
|
graceful_exit(145);
|
||||||
}
|
}
|
||||||
replacestr++;
|
replacestr++;
|
||||||
|
|
@ -105,7 +109,7 @@ index e5c80bc..fbc4eea 100644
|
||||||
|
|
||||||
ttrecdir = dgl_format_str(game, me, myconfig[game]->ttyrecdir, playername);
|
ttrecdir = dgl_format_str(game, me, myconfig[game]->ttyrecdir, playername);
|
||||||
if (!ttrecdir) continue;
|
if (!ttrecdir) continue;
|
||||||
@@ -673,6 +678,8 @@ populate_games (int xgame, int *l, struct dg_user *me)
|
@@ -688,6 +693,8 @@ populate_games (int xgame, int *l, struct dg_user *me)
|
||||||
strlcpy (games[len]->name, pdirent->d_name,
|
strlcpy (games[len]->name, pdirent->d_name,
|
||||||
strlen (pdirent->d_name) + 1);
|
strlen (pdirent->d_name) + 1);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue