UserAlphabetIndex1: incorrect usage not halted?

8 views
Skip to first unread message

Keren Halabi

unread,
Aug 3, 2020, 8:48:32 AM8/3/20
to Bio++ Usage Help Forum
Hi dear team,

I have notices something peculiar in the class UserAlphabetIndex1: it always decrements 1 from the returned index of her corresponding data member alph_.
This property appears to be problematic when the the state is a gap (i.e., -1) in which case its index is 0 and so this decrement results in attempts to access negative, illegal, index -1.
Maybe this is something that should be avoided to begin with? Is there a reason for this decrement? 

Many thanks!
Keren

Laurent Guéguen

unread,
Aug 12, 2020, 11:04:42 AM8/12/20
to Bio++ Usage Help Forum
Hi Keren,

I agree this should not be the case, I remove the decrements.

Cheers,
Laurent

Julien Y. Dutheil

unread,
Aug 12, 2020, 2:23:55 PM8/12/20
to Bio++ Usage Help Forum
Hi,

This is strange, this minus 1 was not part of the original class, it was introduced later on... there must have been a reason :s ?

J.
Reply all
Reply to author
Forward
0 new messages