mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-29 13:00:32 +01:00
e20fb7b2fc
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
21 lines
648 B
Diff
21 lines
648 B
Diff
diff -Naur rejoystick-0.8.1/src/main.c rejoystick-0.8.1.patched/src/main.c
|
|
--- rejoystick-0.8.1/src/main.c 2008-03-23 10:38:22.000000000 -0400
|
|
+++ rejoystick-0.8.1.patched/src/main.c 2022-03-15 21:28:38.753577677 -0400
|
|
@@ -137,12 +137,11 @@
|
|
|
|
pthread_t sdl_thread;
|
|
|
|
- char* home;
|
|
- char* keyfile;
|
|
-
|
|
- home = (char*)getenv("HOME");
|
|
- keyfile = KEYFILE;
|
|
- filename = strcat(home, keyfile);
|
|
+ const char * home = getenv("HOME");
|
|
+ if(!home) error("HOME not set in environment");
|
|
+ filename = malloc(strlen(home) + strlen(KEYFILE) + 1);
|
|
+ if(!filename) error("Out of memory");
|
|
+ sprintf(filename, "%s%s", home, KEYFILE);
|
|
|
|
global_argv = argv;
|
|
|