The mainsail had been set when the mast was shot away, and the gaff, with the sail attached, still retained its position on the mast, the main halliards having somehow jammed in the block, and this it evidently was that prevented the spar from capsizing.
