--- capa/capa51/GUITools/scorertoset.c 2000/08/07 20:47:29 1.4 +++ capa/capa51/GUITools/scorertoset.c 2000/09/11 14:51:25 1.5 @@ -68,7 +68,7 @@ int scorer_set_entry(ClientData notused, Tcl_SetResult(interp,errorline,TCL_VOLATILE); return TCL_ERROR; } - a_line=capa_malloc(strlen(tries)*5,1); + a_line=capa_malloc(strlen(tries)*5+MAX_STUDENT_NUMBER,1); sprintf(a_line,"%s %s,%s\n",student_number,answers,tries); new_len = strlen(a_line); sprintf(fmtbuf, "%%%dc",MAX_STUDENT_NUMBER); @@ -210,7 +210,7 @@ int scorer_get_entry(ClientData notused, entry->tries = tries_p; entry->e_probs = nq; } - sprintf(buf,"%d;%d;%s;%s",offset,entry->e_probs,entry->answers,entry->tries); + sprintf(buf,"%ld;%d;%s;%s",offset,entry->e_probs,entry->answers,entry->tries); Tcl_SetResult(interp,buf,TCL_VOLATILE); return TCL_OK; } @@ -220,7 +220,7 @@ void processFile(FILE *inputFile,Questio { T_entry grade; char studentNumber[MAX_STUDENT_NUMBER+1],name[MAX_NAME_CHAR+1]; - int offset,score,section,buf,i,numRight,points=0,leafs,processed=0,unit; + int score,section,buf,i,numRight,points=0,leafs,processed=0,unit; printf("Processing"); while(fscanf(inputFile,"%s",studentNumber)!=EOF)