diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-11-19 21:16:13 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-12-22 14:41:38 +0100 |
commit | f8298b525a99f371c614554685d83ad2056af416 (patch) | |
tree | 7c965712b7baea0646e98d095c6455690f3c52b7 | |
parent | 5cde1c26dfaff1e8d85888b4375ec6238f983621 (diff) |
Fix off-by-one when renaming Automatizer rule
-rw-r--r-- | src/squeltch.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/squeltch.cc b/src/squeltch.cc index 43f566ea..747c6beb 100644 --- a/src/squeltch.cc +++ b/src/squeltch.cc @@ -251,7 +251,7 @@ static void rename_rule(Rule *rule) Term_get_size(&wid, &hgt); sprintf(name, "%s", rule->get_name()); - if (input_box("New name?", hgt / 2, wid / 2, name, sizeof(name))) + if (input_box("New name?", hgt / 2, wid / 2, name, sizeof(name) - 1)) { rule->set_name(name); } |