1
0
Fork 0
forked from len0rd/rockbox

Minor bug when writing files; files weren't truncated to 0, so when

writing a file smaller than the previous one, it adds garbage to the end.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6147 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michiel Van Der Kolk 2005-03-05 22:50:41 +00:00
parent fabdf1de6f
commit e5b4913d19
3 changed files with 7 additions and 6 deletions

View file

@ -949,7 +949,7 @@ next:
int fd;
blockcount++;
snprintf(meow,499,"/dyna_0x%x_run.rb",PC);
fd=open(meow,O_WRONLY|O_CREAT);
fd=open(meow,O_WRONLY|O_CREAT|O_TRUNC);
if(fd>=0) {
fdprintf(fd,"Block 0x%x Blockcount: %d\n",PC,blockcount);
fdprintf(fd,"before: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n",