From 6f676cdf2fbc53591392c0b8d3e40dea11d92610 Mon Sep 17 00:00:00 2001 From: Ulrich Czekalla Date: Fri, 10 Dec 1999 03:43:07 +0000 Subject: [PATCH] Fixed off-by-one error. --- server/registry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/registry.c b/server/registry.c index 854e647097..b28a2cece6 100644 --- a/server/registry.c +++ b/server/registry.c @@ -550,7 +550,7 @@ static void query_key( struct key *key, struct query_key_info_request *req ) int max_subkey = 0, max_class = 0; int max_value = 0, max_data = 0; - for (i = 0; i < key->last_subkey; i++) + for (i = 0; i <= key->last_subkey; i++) { struct key *subkey = key->subkeys[i]; len = strlenW( subkey->name ); @@ -559,7 +559,7 @@ static void query_key( struct key *key, struct query_key_info_request *req ) len = strlenW( subkey->class ); if (len > max_class) max_class = len; } - for (i = 0; i < key->last_value; i++) + for (i = 0; i <= key->last_value; i++) { len = strlenW( key->values[i].name ); if (len > max_value) max_value = len;