summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés M <andmarti1424@users.noreply.github.com>2016-03-31 10:36:52 -0300
committerAndrés M <andmarti1424@users.noreply.github.com>2016-03-31 10:36:52 -0300
commit65a61050376390c2bd702b22e8e12c934db9664c (patch)
treeac6add01ead12f03720a8559b7b22846438465ab
parentb39b9745763b4fab225ff7fdf136057f12426a56 (diff)
parentdfe6a515ea946a62cb88fc8686bb0e3d9cb4835d (diff)
Merge pull request #64 from laanwj/dev
Fix realpath() issue
-rw-r--r--src/help.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/help.c b/src/help.c
index 6e77b1b..5357136 100644
--- a/src/help.c
+++ b/src/help.c
@@ -2,6 +2,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
+#include <limits.h>
#include "sc.h"
#include "macros.h"
#include "screen.h"
@@ -35,7 +36,7 @@ int load_help () {
// last change to read the help file !
if (! f ) {
- char cwd[1024];
+ char cwd[PATH_MAX];
extern char exepath[];
if (realpath(exepath, cwd) == NULL) return -1;
char * str_pos = strrchr(cwd, '/');