kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
Fixed improper file positionning
rodzic
c0a210a352
commit
fb84823991
|
@ -136,12 +136,10 @@ double M10Decoder::findFrameStart() {
|
|||
|
||||
pos /= headerLength;
|
||||
|
||||
fpos_t fpos;
|
||||
fgetpos(fp, &fpos);
|
||||
fpos += ((int) pos - j)*2;
|
||||
fseek(fp, ((int) pos - j)*2, SEEK_CUR);
|
||||
if (bits_sample == 16) // Two read per value
|
||||
fpos += ((int) pos - j)*2;
|
||||
fsetpos(fp, &fpos);
|
||||
fseek(fp, ((int) pos - j)*2, SEEK_CUR);
|
||||
|
||||
pos = pos - (int) pos;
|
||||
return pos;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue