From 1326f666a67da4bc09727ef4b7b55d392df233da Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Sat, 12 Apr 2003 21:17:47 +0000 Subject: Now handles files with odd length git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3543 a1c6a512-1295-4272-9138-f99709370657 --- tools/scramble.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/scramble.c b/tools/scramble.c index a5c8caea3e..716b73b569 100644 --- a/tools/scramble.c +++ b/tools/scramble.c @@ -50,6 +50,8 @@ int main (int argc, char** argv) } fseek(file,0,SEEK_END); length = ftell(file); + length = (length + 3) & ~3; /* Round up to nearest 4 byte boundary */ + fseek(file,0,SEEK_SET); inbuf = malloc(length); outbuf = malloc(length); -- cgit v1.2.3