mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
SRLが常に16の倍数になるようにした
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1166 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
4a70df1404
commit
5776995e29
@ -214,6 +214,18 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* SRLファイルは最低16バイトの倍数にしておく */
|
||||||
|
#define PADDING_TARGET 16
|
||||||
|
{
|
||||||
|
long fraction = ftell(srl_fp) % PADDING_TARGET;
|
||||||
|
if( fraction ) {
|
||||||
|
long zero[4] = { 0, 0, 0, 0 };
|
||||||
|
if( 1 != fwrite((void*)zero, PADDING_TARGET - fraction, 1, srl_fp) ) {
|
||||||
|
fprintf(stderr,"Error:file write error(padding)\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fclose(bin_fp);
|
fclose(bin_fp);
|
||||||
fclose(srl_fp);
|
fclose(srl_fp);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user