From 4a8b39974bd4854a743b8fbf376c2923ee5dab3c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 1 Jul 2008 15:28:13 -0700 Subject: Fix problem noticed by Jim Brown . When reverse searching decrement index, not increment. Michael please check ! Jeremy. (This used to be commit d89f9d404f478fc9887bb6e67ce28a61464bcf93) --- source3/lib/smbconf/smbconf_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/smbconf/smbconf_util.c') diff --git a/source3/lib/smbconf/smbconf_util.c b/source3/lib/smbconf/smbconf_util.c index b2e253dd26..aa16369269 100644 --- a/source3/lib/smbconf/smbconf_util.c +++ b/source3/lib/smbconf/smbconf_util.c @@ -138,7 +138,7 @@ bool smbconf_reverse_find_in_array(const char *string, char **list, return false; } - for (i = num_entries - 1; i >= 0; i++) { + for (i = num_entries - 1; i >= 0; i--) { if (strequal(string, list[i])) { if (entry != NULL) { *entry = i; -- cgit