Never loop up to _and including_ lenof(array).
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 26 Sep 2005 08:51:43 +0000 (08:51 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 26 Sep 2005 08:51:43 +0000 (08:51 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/charset@6357 cda61777-01e9-0310-a592-d414129be87e

iso2022.c

index 7d9f028..6297b91 100644 (file)
--- a/iso2022.c
+++ b/iso2022.c
@@ -195,7 +195,7 @@ static void designate(charset_state *state, int container,
     assert(container >= 0 && container <= 3);
     assert(type == S4 || type == S6 || type == M4 || type == M6);
 
-    for (i = 0; i <= lenof(iso2022_subcharsets); i++) {
+    for (i = 0; i < lenof(iso2022_subcharsets); i++) {
        if (iso2022_subcharsets[i].type == type &&
            iso2022_subcharsets[i].i == ibyte &&
            iso2022_subcharsets[i].f == fbyte) {