Commit f9db7c63 authored by Mikaël Salson's avatar Mikaël Salson

automaton.hpp: Report info only if non null

That wasn't a bug (as a null info has a 0-length). But I prefer preventing
an overwriting of an actual result with an empty result.
parent 8a9a2023
......@@ -271,7 +271,9 @@ vector<Info> PointerACAutomaton<Info>::getResults(const seqtype &seq, bool no_re
for (size_t i = 0; i < seq_len; i++) {
current_state = (pointer_state<Info> *)next(current_state, seq[i]);
Info info = current_state->informations.front();
result[i - info.getLength()+1] = info;
if (! info.isNull()) {
result[i - info.getLength()+1] = info;
}
}
return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment