diff options
Diffstat (limited to 'streamcache.c')
-rw-r--r-- | streamcache.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/streamcache.c b/streamcache.c index 4277ef0..be50248 100644 --- a/streamcache.c +++ b/streamcache.c @@ -54,17 +54,17 @@ static void init_streamcache(void) atexit(finish_sc); } -Stream_t *open_root_dir(unsigned char drive, int flags, int *isRop) +Stream_t *open_root_dir(char drive, int flags, int *isRop) { Stream_t *Fs; init_streamcache(); - drive = toupper(drive); - + drive = (char)toupper(drive); + /* open the drive */ - if(fss[drive]) - Fs = fss[drive]; + if(fss[(unsigned char)drive]) + Fs = fss[(unsigned char)drive]; else { Fs = fs_init(drive, flags, isRop); if (!Fs){ @@ -72,7 +72,7 @@ Stream_t *open_root_dir(unsigned char drive, int flags, int *isRop) return NULL; } - fss[drive] = Fs; + fss[(unsigned char)drive] = Fs; } return OpenRoot(Fs); |