Heck ya good save mang.
How much power were you pulling through it?
That orange one looks like it's only a 16 gauge ext cord, if so it's only safe to use for a continued 8 amp draw. Or basically 800 watts of power.
And that's only if it's less than 50 ft of cord.
Looks like the plug end may have had some corrosion on it as well, or maybe that's just from the burn though.
Corroded plug ends cause resistance in the connection, and that makes heat and or can cause arcs. A little steel wool will clean up the plug ends if you have that as an issue, and a little die electric grease or "No alox" will prevent it.