 The movies ending, different from the source novel, is usually  attributed to director Robert Altman (I) (qv). It actually  appeared in Leigh Brackett (qv)s original script, written before  Altman signed on. Altman liked the new ending so much that he  insisted on a clause in his contract that guaranteed the ending  wouldnt be changed during production or editing.