codetree = shuff_buildtree(inputlist,freqcount);
currnode = codetree;
- while (!feof(fpsource->fp) && (bytesleft > 0)) {
+ while (!vfeof(fpsource) && (bytesleft > 0)) {
/* Leo un buffer de 32 bits */
if (vfread(&codebuffer,sizeof(unsigned long int),1,fpsource) != 1) continue;