Commit 784943f
Fix library-path projection overflow when num_proj > num_wann
The library interface called get_projections(lcount=.false.) directly,
allocating input_proj at size num_wann. When the projections block
defines more functions than num_wann (valid for disentanglement), the
fill loop writes beyond the array bounds.
Add the counting pass (lcount=.true.) before the fill pass so that
num_proj is updated to the actual projection count before input_proj
is allocated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 46c1b7b commit 784943f
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1606 | 1606 | | |
1607 | 1607 | | |
1608 | 1608 | | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
1609 | 1615 | | |
1610 | 1616 | | |
1611 | 1617 | | |
| |||
0 commit comments