src/cdrom/osf/SDL_syscdrom.c
changeset 1438 1f4f09641645
parent 1402 d910939febfa
child 1635 92947e3a18db
equal deleted inserted replaced
1437:f1781c15934c 1438:1f4f09641645
   171     /* Look in the environment for our CD-ROM drive list */
   171     /* Look in the environment for our CD-ROM drive list */
   172     SDLcdrom = SDL_getenv("SDL_CDROM");	/* ':' separated list of devices */
   172     SDLcdrom = SDL_getenv("SDL_CDROM");	/* ':' separated list of devices */
   173     if ( SDLcdrom != NULL ) {
   173     if ( SDLcdrom != NULL ) {
   174 	char *cdpath, *delim;
   174 	char *cdpath, *delim;
   175 	size_t len = SDL_strlen(SDLcdrom)+1;
   175 	size_t len = SDL_strlen(SDLcdrom)+1;
   176 	cdpath = SDL_stack_alloc(len);
   176 	cdpath = SDL_stack_alloc(char, len);
   177 	if ( cdpath != NULL ) {
   177 	if ( cdpath != NULL ) {
   178 	    SDL_strlcpy(cdpath, SDLcdrom, len);
   178 	    SDL_strlcpy(cdpath, SDLcdrom, len);
   179 	    SDLcdrom = cdpath;
   179 	    SDLcdrom = cdpath;
   180 	    do {
   180 	    do {
   181 		delim = SDL_strchr(SDLcdrom, ':');
   181 		delim = SDL_strchr(SDLcdrom, ':');