diff options
Diffstat (limited to 'src/ui/inputwin.c')
-rw-r--r-- | src/ui/inputwin.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index ca3b688c..40875935 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -196,6 +196,13 @@ inp_readline(void) } if (inp_line) { + if (!get_password && prefs_get_boolean(PREF_SLASH_GUARD)) { + char *res = (char*) memchr (inp_line+1, '/', 3); + if (res) { + cons_show("Your text contains a slash in the first 4 characters"); + return NULL; + } + } return strdup(inp_line); } else { return NULL; |