The movie's ending, different from the source novel, is usually attributed to director Robert Altman. It actually appeared in Leigh Brackett'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 wouldn't be changed during production or editing.