diff -r 97ee8167485f -r a55c2d4bebe4 core/smn_keyvalues.cpp --- a/core/smn_keyvalues.cpp Mon May 07 00:02:33 2007 +0000 +++ b/core/smn_keyvalues.cpp Mon May 07 00:03:37 2007 +0000 @@ -653,7 +653,7 @@ return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr); } - return pStk->pCurRoot.size(); + return pStk->pCurRoot.size() - 1; } static cell_t smn_KvDeleteThis(IPluginContext *pContext, const cell_t *params)