Fixed bug 4108 - Missing break statements in SDL_CDResume and SDL_CDStop SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Sat, 24 Mar 2018 10:15:42 -0700
branchSDL-1.2
changeset 119362b3d476e2ed9
parent 11717 d1eed22a751d
child 11962 6d7d78d2d864
Fixed bug 4108 - Missing break statements in SDL_CDResume and SDL_CDStop

Ozkan Sezer

Two break statements are missing in SDL_cdrom.c:SDL_CDResume()
and SDL_CDStop(), which negate the returned code from driver
and always return 0. The following patch adds those breaks.
src/cdrom/SDL_cdrom.c
     1.1 --- a/src/cdrom/SDL_cdrom.c	Sun Dec 03 18:11:12 2017 +0100
     1.2 +++ b/src/cdrom/SDL_cdrom.c	Sat Mar 24 10:15:42 2018 -0700
     1.3 @@ -285,6 +285,7 @@
     1.4  	switch (status) {
     1.5  		case CD_PAUSED:
     1.6  			retval = SDL_CDcaps.Resume(cdrom);
     1.7 +			break;
     1.8  		default:
     1.9  			retval = 0;
    1.10  			break;
    1.11 @@ -307,6 +308,7 @@
    1.12  		case CD_PLAYING:
    1.13  		case CD_PAUSED:
    1.14  			retval = SDL_CDcaps.Stop(cdrom);
    1.15 +			break;
    1.16  		default:
    1.17  			retval = 0;
    1.18  			break;