From 0c7d2796ba8e10f8ca748dc07d22c6eb2e04c9cb Mon Sep 17 00:00:00 2001 From: prozacx Date: Thu, 5 Oct 2006 20:52:50 +0000 Subject: [PATCH] Patched from psycho git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@783 726aef4b-f618-498e-8847-2d620e286838 --- modules/perform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/perform.cpp b/modules/perform.cpp index 633dd70b..8100609a 100644 --- a/modules/perform.cpp +++ b/modules/perform.cpp @@ -50,14 +50,14 @@ public: } else if(sCmdName == "del") { u_int iNum = atoi( sCommand.Token(1, true).c_str() ); - if ( iNum >= m_vPerform.size() ) + if ( iNum > m_vPerform.size() || iNum <= 0 ) { PutModule( "Illegal # Requested"); return; } else { - m_vPerform.erase( m_vPerform.begin() + iNum ); + m_vPerform.erase( m_vPerform.begin() + iNum - 1 ); PutModule( "Command Erased."); } Save();