but then they had hit a storm , a raging freak late-season hurricane that had battered and beaten the poor little boat until both the mainmast and the mizzenmast had snapped in two like dry twigs underfoot .