mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-26 06:37:20 +02:00
Unit Tests
- Fixed bug in Nibbler::getN. - Added unit test for Nibbler::getN.
This commit is contained in:
parent
01d3da90ae
commit
c244132476
2 changed files with 13 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue