From: simon Date: Mon, 26 Sep 2005 08:51:43 +0000 (+0000) Subject: Never loop up to _and including_ lenof(array). X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/charset/commitdiff_plain/daff36500cf83fd55dae1a6d89a20798735442c4 Never loop up to _and including_ lenof(array). git-svn-id: svn://svn.tartarus.org/sgt/charset@6357 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/iso2022.c b/iso2022.c index 7d9f028..6297b91 100644 --- 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) {