Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend_right/left() needs char const * overload. #1473

Closed
h-2 opened this issue Jan 9, 2020 · 0 comments · Fixed by #1588
Closed

extend_right/left() needs char const * overload. #1473

h-2 opened this issue Jan 9, 2020 · 0 comments · Fixed by #1588
Assignees
Labels
bug faulty or wrong behaviour of code
Milestone

Comments

@h-2
Copy link
Member

h-2 commented Jan 9, 2020

extend_right() in the index module does not handle null-terminated strings properly:

#include <seqan3/search/fm_index/all.hpp>
#include <seqan3/core/debug_stream.hpp>

using namespace seqan3;

int main()
{
std::string text = "How much wood would a woodchuck chuck?";
fm_index index{text};

auto it = index.begin();

if (it.extend_right("wood"))
    debug_stream << it.locate() << '\n';
}

Outputs no results, but wrapping "wood" into std::string produces correct behaviour.

@h-2 h-2 added the bug faulty or wrong behaviour of code label Jan 9, 2020
@marehr marehr changed the title extend_right() needs char const * overload. extend_right/left() needs char const * overload. Feb 13, 2020
@rrahn rrahn added this to the Sprint 1 milestone Mar 27, 2020
Irallia added a commit to Irallia/seqan3 that referenced this issue Apr 8, 2020
Signed-off-by: Lydia Buntrock <lydia.buntrock@fu-berlin.de>
Irallia added a commit to Irallia/seqan3 that referenced this issue Apr 11, 2020
Signed-off-by: Lydia Buntrock <lydia.buntrock@fu-berlin.de>
@rrahn rrahn modified the milestones: Sprint 1, Sprint 2 Apr 15, 2020
Irallia added a commit to Irallia/seqan3 that referenced this issue Apr 16, 2020
Signed-off-by: Lydia Buntrock <lydia.buntrock@fu-berlin.de>
smehringer pushed a commit that referenced this issue Apr 20, 2020
* [FIX] extend_right() needs `char const *` overload

* [TEST] add tests for issue #1473

* [FIX] missing initialisation added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug faulty or wrong behaviour of code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants