oops, 8bit instead of 16

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3525 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
michael 2001-12-16 13:24:13 +00:00
parent 80c90e39c6
commit 671e9d2e1d
1 changed files with 11 additions and 6 deletions

View File

@ -22,11 +22,16 @@ int main(int argc, char **argv)
for(;;)
{
int c0= fgetc(f0);
int c1= fgetc(f1);
int d= c0-c1;
if(c0<0 && c1<0) break;
if(c0<0 || c1<0)
short c0;
short c1;
int d;
int e0= fread(&c0, 2, 1, f0);
int e1= fread(&c1, 2, 1, f1);
d=c0-c1;
if(e0==0 && e1==0) break;
if(e0==0 || e1==0)
{
printf("FATAL error, files have different size!\n");
exit(1);
@ -35,7 +40,7 @@ int main(int argc, char **argv)
if(d<0) d=-d; // ABS
if(d>1)
{
printf("FATAL error, too large differnce found!\n");
printf("FATAL error, too large differnce found (%d)!\n", d);
exit(1);
}