mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-30 08:08:39 -05:00
Make fano.c decode 31 tail zeros instead of just 30. This decreases the probability of bad decodes somewhat.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5746 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
eb68758962
commit
73825e66f1
@ -105,7 +105,7 @@ int fano(
|
||||
unsigned int lsym;
|
||||
unsigned int i;
|
||||
|
||||
if((nodes = (struct node *)malloc(nbits*sizeof(struct node))) == NULL) {
|
||||
if((nodes = (struct node *)malloc((nbits+1)*sizeof(struct node))) == NULL) {
|
||||
printf("malloc failed\n");
|
||||
return 0;
|
||||
}
|
||||
@ -172,7 +172,7 @@ int fano(
|
||||
}
|
||||
np[1].gamma = ngamma; // Move forward
|
||||
np[1].encstate = np->encstate << 1;
|
||||
if(++np == lastnode) {
|
||||
if( ++np == (lastnode+1) ) {
|
||||
break; // Done!
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user