From: Howard Chu Date: Tue, 1 Mar 2005 21:16:44 +0000 (+0000) Subject: Fix prev commit X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~113 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5a2333573cdbf1f0a3fa99690b861b5f9e9a09d1;p=openldap Fix prev commit --- diff --git a/servers/slapd/slapi/plugin.c b/servers/slapd/slapi/plugin.c index b2ff3d82c5..6ebe041408 100644 --- a/servers/slapd/slapi/plugin.c +++ b/servers/slapd/slapi/plugin.c @@ -24,6 +24,7 @@ #include #include #include +#include /* * Note: if ltdl.h is not available, slapi should not be compiled @@ -778,13 +779,13 @@ slapi_int_plugin_unparse( slapi_pblock_get( pp, SLAPI_X_CONFIG_ARGV, &argv ); idx.bv_len = sprintf( idx.bv_val, "{%d}", i ); bv.bv_len = idx.bv_len; - for (j=0; argv[j]; j++) { + for (j=1; argv[j]; j++) { bv.bv_len += strlen(argv[j]); if ( j ) bv.bv_len++; } bv.bv_val = ch_malloc( bv.bv_len + 1 ); ptr = lutil_strcopy( bv.bv_val, ibuf ); - for (j=0; argv[j]; j++) { + for (j=1; argv[j]; j++) { if ( j ) *ptr++ = ' '; ptr = lutil_strcopy( ptr, argv[j] ); }