Commit 48ebb81f authored by Chris Allegretta's avatar Chris Allegretta
Browse files

nano.c:main() - Fixed off by one when checking for MAIN_LIST_LEN. Ugh.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@871 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 4 additions and 2 deletions
+4 -2
...@@ -35,6 +35,8 @@ CVS code - ...@@ -35,6 +35,8 @@ CVS code -
goofy logic setting x pos to value of last line when hitting the goofy logic setting x pos to value of last line when hitting the
beginning of first line, prog should simply abort. Added beginning of first line, prog should simply abort. Added
the #ifdefs around the code in main(). the #ifdefs around the code in main().
main()
- Fixed off by one when checking for MAIN_LIST_LEN. Ugh.
- rcfile.c: - rcfile.c:
- Fix incorrect number of rc options (David Lawrence Ramsey). - Fix incorrect number of rc options (David Lawrence Ramsey).
- po/sv.po: - po/sv.po:
......
...@@ -3115,7 +3115,7 @@ int main(int argc, char *argv[]) ...@@ -3115,7 +3115,7 @@ int main(int argc, char *argv[])
/* Look through the main shortcut list to see if we've hit a /* Look through the main shortcut list to see if we've hit a
shortcut key */ shortcut key */
for (i = 0; i < MAIN_LIST_LEN && !keyhandled; i++) { for (i = 0; i < MAIN_LIST_LEN - 1 && !keyhandled; i++) {
if (kbinput == main_list[i].val || if (kbinput == main_list[i].val ||
(main_list[i].misc1 && kbinput == main_list[i].misc1) || (main_list[i].misc1 && kbinput == main_list[i].misc1) ||
(main_list[i].misc2 && kbinput == main_list[i].misc2)) { (main_list[i].misc2 && kbinput == main_list[i].misc2)) {
...@@ -3167,8 +3167,8 @@ int main(int argc, char *argv[]) ...@@ -3167,8 +3167,8 @@ int main(int argc, char *argv[])
#endif #endif
#endif #endif
#ifndef NANO_SMALL
case 0: /* Erg */ case 0: /* Erg */
#ifndef NANO_SMALL
do_next_word(); do_next_word();
break; break;
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment