Yesterday my laptop charger was sparking, so I pushed the power lead more snugly into the adapter and it stopped. When I got home, it did the same, but seemed to be pretty firmly connected, so I unplugged it from the mains and took the power lead out of the adapter: one of the connector pins came out with it!
It seems that the dodgy connection wasn't with the external cable, but internally in the unit. After much fannying about, I've ordered a replacement from Amazon, and in the mean time I've gone back to my previous charger; which has patched-together wires and is held together with duck tape!
I did try to open up the charger to see if I could reconnect the pin, but I couldn't prise open the case. I did notice a quality control sticker on it though: it passed inspection in August 2016...