summaryrefslogtreecommitdiffstats
path: root/src/intrfn.h
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/intrfn.h
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/intrfn.h')
-rw-r--r--src/intrfn.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intrfn.h b/src/intrfn.h
index 03c43f4..adfe5b2 100644
--- a/src/intrfn.h
+++ b/src/intrfn.h
@@ -65,9 +65,9 @@ char *ask_log_location(const char*filename, const int errsv);
int get_string(WINDOW *window, char *str, const int len, const char *def);
uint64_t ask_int_ncurses(const char *string);
const char *ask_string_ncurses(const char *string);
-const char *td_curses_version(void);
#endif
+const char *td_curses_version(void);
void display_message(const char*msg);
#ifdef __cplusplus