Skip to content

Commit

Permalink
Fixing an asymmetry between writing an reading of the binary transfor…
Browse files Browse the repository at this point in the history
…mation file - read was expecting an extra nextline, which ofsetted the following bytes and thus corrupted the reading
  • Loading branch information
Viktor Walter committed Jun 23, 2022
1 parent 90c76ac commit 1fe9f83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/serialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ int vsReadFileVersionBinary(FILE* f){
unsigned char version;
VSMotionDetectConfig conf;

if(fscanf(f, "TRF%hhu\n", &version)!=LIBVIDSTAB_FILE_FORMAT_VERSION) goto parse_error_handling;
if(fscanf(f, "TRF%hhu", &version)!=LIBVIDSTAB_FILE_FORMAT_VERSION) goto parse_error_handling;
if(readInt32(&conf.accuracy, f)<=0) goto parse_error_handling;
if(readInt32(&conf.shakiness, f)<=0) goto parse_error_handling;
if(readInt32(&conf.stepSize, f)<=0) goto parse_error_handling;
Expand Down

0 comments on commit 1fe9f83

Please sign in to comment.