summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libunix.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2013-06-06 18:03:29 -0400
committerNeil Moore <neil@s-z.org>2013-06-06 18:12:03 -0400
commit48f42c2f12c3d89f714eea971ff303494f9bfab4 (patch)
treeb81d6ba88cec68902bd13a3162236a86b3356c13 /crawl-ref/source/libunix.cc
parentfbb8015d47d88d2cd48987f033fd439879ea559d (diff)
downloadcrawl-ref-48f42c2f12c3d89f714eea971ff303494f9bfab4.tar.gz
crawl-ref-48f42c2f12c3d89f714eea971ff303494f9bfab4.zip
Avoid a constness warning.
For some nonsensical reason, tigetstr takes a char * instead of a const char *.
Diffstat (limited to 'crawl-ref/source/libunix.cc')
-rw-r--r--crawl-ref/source/libunix.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc
index 14a01558ca..aa92856e01 100644
--- a/crawl-ref/source/libunix.cc
+++ b/crawl-ref/source/libunix.cc
@@ -392,7 +392,8 @@ int unixcurses_get_vi_key(int keyin)
// Note that this mangling occurs entirely on the machine Crawl runs
// on (and even within crawl's process) rather than where the user's
// terminal is, so this check is reliable.
- static const char * const kbs = tigetstr("kbs");
+ static char kbskey[] = "kbs"; // tigetstr wants a non-const pointer :(
+ static const char * const kbs = tigetstr(kbskey);
static const int bskey = (kbs && kbs != (const char *) -1
&& kbs == string("\010")) ? CK_BKSP
: KEY_BACKSPACE;