In section 151 of the principal Act,--
(a) in sub-section (1), for the word, brackets and figure "sub-section (2)", the words, brackets and figures "sub-section (2) and (3)" shall be substituted;
(b) after sub-section (2), the following sub-section shall be inserted, namely:--
"(3) Whenever any offender is sentenced by a court-martial to a term of imprisonment, in pursuance of this Act, not being imprisonment in default of payment of fine, the period spent by him in civil or naval custody during investigation, inquiry or trial of the same case, and before the date or order of such sentence, shall be set off against the terms of imprisonment imposed upon him, and the liability of such offender to undergo imprisonment on such order of sentence shall be restricted to the remainder, if any, of the term of imprisonment imposed upon him.".