Skip to content

Commit

Permalink
Merge pull request #125 from brad0/unsigned_char_fix
Browse files Browse the repository at this point in the history
Fix for archs where char is unsigned by default
  • Loading branch information
georgmartius authored Jun 3, 2023
2 parents 77f3ba1 + dd73c5d commit 05829db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/serialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ LocalMotion restoreLocalmotion(FILE* f, const int serializationMode){

LocalMotion restoreLocalmotionText(FILE* f){
LocalMotion lm;
char c;
int c;
if(fscanf(f,"(LM %hi %hi %hi %hi %hi %lf %lf", &lm.v.x,&lm.v.y,&lm.f.x,&lm.f.y,&lm.f.size,
&lm.contrast, &lm.match) != 7) {
vs_log_error(modname, "Cannot parse localmotion!\n");
Expand Down Expand Up @@ -256,7 +256,7 @@ LocalMotions vsRestoreLocalmotions(FILE* f, const int serializationMode){
LocalMotions vsRestoreLocalmotionsText(FILE* f){
LocalMotions lms;
int i;
char c;
int c;
int len;
vs_vector_init(&lms,0);
if(fscanf(f,"List %i [", &len) != 1) {
Expand Down Expand Up @@ -417,7 +417,7 @@ int vsReadFromFile(FILE* f, LocalMotions* lms, const int serializationMode){
}

int vsReadFromFileText(FILE* f, LocalMotions* lms){
char c = fgetc(f);
int c = fgetc(f);
if(c=='F') {
int num;
if(fscanf(f,"rame %i (", &num)!=1) {
Expand Down

0 comments on commit 05829db

Please sign in to comment.