Unit Tests
- Fixed bug in Nibbler::getN. - Added unit test for Nibbler::getN.
This commit is contained in:
@@ -219,7 +219,7 @@ bool Nibbler::getUntilEOS (std::string& result)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Nibbler::getN (const int quantity, std::string& result)
|
||||
{
|
||||
if (mCursor + quantity < mLength)
|
||||
if (mCursor + quantity <= mLength)
|
||||
{
|
||||
result = mInput.substr (mCursor, quantity);
|
||||
mCursor += quantity;
|
||||
|
||||
Reference in New Issue
Block a user