diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index e1aaadf814..62368b254c 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -4991,13 +4991,25 @@ syscall_cdaudio: ; CD and eax, 1 mov [DiskNumber], eax call reserve_cd_channel + and ebx, 3 inc ebx mov [cdpos], ebx + add ebx, ebx + mov cl, 8 + sub cl, bl + mov al, [DRIVE_DATA+1] + shr al, cl + test al, 2 + jz .err ret .free: call free_cd_channel and [cd_status], 0 ret +.err: + call .free + pop eax + ret align 4