char hex_i0[12]="a";
char hex_i1[12]="a";
FILE * pFile_i0 = NULL;
FILE * pFile_i1 = NULL;
pFile_i0 = fopen("../../hex/test6713.i0","r");
pFile_i1 = fopen("../../hex/test6713.i1","r");
if((!pFile_i0) || (!pFile_i1))
fprintf(stderr, "open i0 and i1 error\n");
else
{
fprintf(stderr, "open i0 and i1 success\n");
hexlen_i0 = fread(hex_i0,1,0x80000,pFile_i0);
hexlen_i1 = fread(hex_i1,1,0x80000,pFile_i1);
fclose(pFile_i0);
fclose(pFile_i1);
}
当定义的hex_i0的缓存区大小小于要读取的数据时就会出现这种错误,需要把读取的缓存区改大就可以了。
文章评论(0条评论)
登录后参与讨论