forked from len0rd/rockbox
Now handles files with odd length
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3543 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e738e33e94
commit
1326f666a6
1 changed files with 2 additions and 0 deletions
|
|
@ -50,6 +50,8 @@ int main (int argc, char** argv)
|
||||||
}
|
}
|
||||||
fseek(file,0,SEEK_END);
|
fseek(file,0,SEEK_END);
|
||||||
length = ftell(file);
|
length = ftell(file);
|
||||||
|
length = (length + 3) & ~3; /* Round up to nearest 4 byte boundary */
|
||||||
|
|
||||||
fseek(file,0,SEEK_SET);
|
fseek(file,0,SEEK_SET);
|
||||||
inbuf = malloc(length);
|
inbuf = malloc(length);
|
||||||
outbuf = malloc(length);
|
outbuf = malloc(length);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue