summaryrefslogtreecommitdiffstats
path: root/src/phmain.c
diff options
context:
space:
mode:
authorTobias Dammers <dammers@tracksinspector.com>2016-06-20 11:58:18 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2016-06-22 12:08:24 +0200
commit9de993e4d3691f8c24c09c2118f207eb6ca62dbb (patch)
tree0de768c768def1410d61ece29509d4a132c3d44c /src/phmain.c
parent7db2d008de8c2012eb5dd8297abfa0a478264df6 (diff)
Fixed: disabling curses caused segfaults with /log
This is because when HAVE_CURSES is undefined, phmain.c did not include intrf.h, which caused td_curses_version() to be undeclared and default to return type int (but should be const char *). As a result, vprintf receives an int argument for %s, which coredumps. This commit changes things so that intrf.h is included unconditionally (that header has appropriate guards in place already), and moves the declaration of td_curses_version() outside the guard so that it is always declared.
Diffstat (limited to 'src/phmain.c')
-rw-r--r--src/phmain.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/phmain.c b/src/phmain.c
index a21b135..02244a9 100644
--- a/src/phmain.c
+++ b/src/phmain.c
@@ -59,9 +59,7 @@
#include "common.h"
#include "intrf.h"
#include "fnctdsk.h"
-#ifdef HAVE_NCURSES
#include "intrfn.h"
-#endif
#include "dir.h"
#include "filegen.h"
#include "photorec.h"