Search
lxdream.org :: lxdream/src/dcload.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/dcload.c
changeset 1290:b41d4dc2c83e
prev1065:bc1cc0c54917
author nkeynes
date Sat Aug 04 08:27:01 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Fix dcload file handling bugs, patch from Guinux, thanks!
file annotate diff log raw
1.1 --- a/src/dcload.c Sun Jul 05 13:52:50 2009 +1000
1.2 +++ b/src/dcload.c Sat Aug 04 08:27:01 2012 +1000
1.3 @@ -106,7 +106,7 @@
1.4 if( fd < 0 || fd >= MAX_OPEN_FDS || open_fds[fd] == -1 ) {
1.5 sh4r.r[0] = -1;
1.6 } else {
1.7 - sh4r.r[0] = lseek( open_fds[fd], sh4r.r[6], sh4r.r[7] );
1.8 + sh4r.r[0] = lseek( open_fds[fd], (int32_t)sh4r.r[6], sh4r.r[7] );
1.9 }
1.10 break;
1.11
1.12 @@ -120,7 +120,7 @@
1.13 char *filename = (char *)mem_get_region( sh4r.r[5] );
1.14 int realfd = open( filename, sh4r.r[6] );
1.15 open_fds[fd] = realfd;
1.16 - sh4r.r[0] = realfd;
1.17 + sh4r.r[0] = fd;
1.18 }
1.19 } else {
1.20 ERROR( "Denying access to local filesystem" );
.