Both are correct. The past tense of some verbs can end in both -ed and -nt
For example: lear-learned/learnt
burn - burned/burnt
Other verbs that follow this rule: dream, dwell, smell, spill, spoil.
The ed form is preferred in American English (AmE) whereas the nt form is more common in British English (BrE).