fix: handle N base in bit-packed insertion encoding (#109)
When nst_nt4_table returns 4 (for ‘N’ or unknown bases), the bit shift can cause unexpected behavior:
- In short insertions (line 318): value 4 encoded into 2-bit field
- In long insertions (line 350): value 4 shifted by 0-6 bits can overflow uint8_t when bit_index=3 (4 << 6 = 256)
Fix: Check if base lookup returns >= 4 and substitute a random base, consistent with the behavior when bases parameter is NULL.
🤖 Generated with Claude Code
Co-authored-by: Claude Opus 4.5 noreply@anthropic.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Welcome to DWGSIM.
Documentation can be found in the docs folder