1.1 --- a/src/mem.c Wed Dec 28 22:47:44 2005 +0000
1.2 +++ b/src/mem.c Sun Apr 30 01:50:15 2006 +0000
1.5 - * $Id: mem.c,v 1.10 2005-12-28 22:47:44 nkeynes Exp $
1.6 + * $Id: mem.c,v 1.11 2006-01-10 14:00:00 nkeynes Exp $
1.7 * mem.c is responsible for creating and maintaining the overall system memory
1.8 * map, as visible from the SH4 processor.
1.13 fstat( fileno(f), &st );
1.14 - if( length == 0 || length == -1 )
1.15 + if( length == 0 || length == -1 || length > st.st_size )
1.16 length = st.st_size;
1.18 while( total < length ) {