]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix signdedness error in LoopCall
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 16 Jan 2010 19:45:16 +0000 (19:45 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 16 Jan 2010 19:45:16 +0000 (19:45 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12268 e03df62e-2008-0410-955e-edbf42e46eb7

include/command_parse.h
src/command_parse.cpp

index ac401ff6756a6312e7cca3f213b7035e97f0ba75..2b03ec9bd22be3b564351616faabe31bbd2e3bd4 100644 (file)
@@ -105,7 +105,7 @@ class CoreExport CommandParser
         * @return This function will return 1 when there are no more parameters to process. When this occurs, its
         * caller should return without doing anything, otherwise it should continue into its main section of code.
         */
-       int LoopCall(User* user, Command* CommandObj, const std::vector<std::string>& parameters, unsigned int splithere, unsigned int extra = -1, bool usemax = true);
+       int LoopCall(User* user, Command* CommandObj, const std::vector<std::string>& parameters, unsigned int splithere, int extra = -1, bool usemax = true);
 
        /** Take a raw input buffer from a recvq, and process it on behalf of a user.
         * @param buffer The buffer line to process
index 2169817733ff9f2ce5b1f4b709570e06f8169e2f..8d5bcbee41d59a8cdaf7dc861141d4e07d1de55d 100644 (file)
@@ -55,12 +55,12 @@ int InspIRCd::PassCompare(Extensible* ex, const std::string &data, const std::st
  * The second version is much simpler and just has the one stream to read, and is used in NAMES, WHOIS, PRIVMSG etc.
  * Both will only parse until they reach ServerInstance->Config->MaxTargets number of targets, to stop abuse via spam.
  */
-int CommandParser::LoopCall(User* user, Command* CommandObj, const std::vector<std::string>& parameters, unsigned int splithere, unsigned int extra, bool usemax)
+int CommandParser::LoopCall(User* user, Command* CommandObj, const std::vector<std::string>& parameters, unsigned int splithere, int extra, bool usemax)
 {
        if (splithere >= parameters.size())
                return 0;
 
-       if (extra >= parameters.size())
+       if (extra >= (signed)parameters.size())
                extra = -1;
 
        /* First check if we have more than one item in the list, if we don't we return zero here and the handler