Fixed bug with burn_disc_available_space(...,NULL)

This commit is contained in:
Thomas Schmitt 2007-03-24 09:31:11 +00:00
parent 17c87b78a6
commit 98f0dab87e
2 changed files with 7 additions and 5 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2007.03.15.195534" #define Cdrskin_timestamP "2007.03.24.093238"

View File

@ -1458,11 +1458,13 @@ off_t burn_disc_available_space(struct burn_drive *d,
d->send_write_parameters(d, o); d->send_write_parameters(d, o);
d->get_nwa(d, -1, &lba, &nwa); d->get_nwa(d, -1, &lba, &nwa);
ex:; ex:;
if (o != NULL) {
if (o->start_byte > 0) { if (o->start_byte > 0) {
if (o->start_byte > d->media_capacity_remaining) if (o->start_byte > d->media_capacity_remaining)
return 0; return 0;
return d->media_capacity_remaining - o->start_byte; return d->media_capacity_remaining - o->start_byte;
} }
}
return d->media_capacity_remaining; return d->media_capacity_remaining;
} }