fixed amb819 - SplitString() cut off search by one character

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401366
This commit is contained in:
David Anderson 2007-08-19 17:31:26 +00:00
parent 6a05c0925c
commit 2a3de44ddb

View File

@ -538,7 +538,11 @@ static cell_t SplitString(IPluginContext *pContext, const cell_t *params)
return -1; return -1;
} }
for (size_t i=0; i<textLen - splitLen; i++) /**
* Note that it's <= ... you could also just add 1,
* but this is a bit nicer
*/
for (size_t i=0; i<=textLen - splitLen; i++)
{ {
if (strncmp(&text[i], split, splitLen) == 0) if (strncmp(&text[i], split, splitLen) == 0)
{ {