The service of an indeterminate sentence of imprisonment shall satisfy any definite sentence of imprisonment imposed on a person for an offense committed prior to the time the indeterminate sentence was imposed, except as provided in paragraph (b) of subdivision five of section 70.25 of this article. A person who is serving a definite sentence at the time an indeterminate sentence is imposed shall be delivered to the custody of the state department of corrections and community supervision to commence service of the indeterminate sentence immediately unless the person is serving a definite sentence pursuant to paragraph (b) of subdivision five of section 70.25 of this article. In any case where the indeterminate sentence is revoked or vacated, the person shall receive credit against the definite sentence for each day spent in the custody of the state department of corrections and community supervision.
N.Y. Penal Law § 70.35