Previous 15994 Revisions Next

r3144 Monday 1st September, 2008 at 22:49:30 UTC by R. Belmont
Fixed File Manager so you can navigate all the way down to the root without crashing [patch by BobZ]
[src/mess]zippath.c
[src/mess/osd/sdl]sdlmess.c

src/mess/zippath.c
r3143r3144
6767      *endpos = pos;
6868
6969   /* now skip until we find a path separator */
70   while((pos > 0) && !osd_is_path_separator(path[pos]))
70   while((pos >= 0) && !osd_is_path_separator(path[pos]))
7171      pos--;
7272
7373   /* return beginpos */
r3143r3144
8787   parse_parent_path(path, &pos, NULL);
8888
8989   /* return the result */
90   return (pos > 0) ? astring_cpych(dst, path, pos + 1) : NULL;
90   return (pos >= 0) ? astring_cpych(dst, path, pos + 1) : NULL;
9191}
9292
9393
r3143r3144
320320   {
321321      /* trim the path of trailing path separators */
322322      i = astring_len(apath);
323      while((i > 0) && osd_is_path_separator(astring_c(apath)[i - 1]))
323      while((i > 1) && osd_is_path_separator(astring_c(apath)[i - 1]))
324324         i--;
325325      apath_trimmed = astring_cpysubstr(apath_trimmed, apath, 0, i);
326326
src/mess/osd/sdl/sdlmess.c
r3143r3144
155155// no idea what these are for, just cheese them
156156int osd_num_devices(void)
157157{
158   return 1;
158   return 0;
159159}
160160
161161const char *osd_get_device_name(int idx)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team