Here is a great drawing of a pterosaur
It shows the "pteroid bone" which is a neomorph. It shows the other fingers including the extended 4th finger.
It shows that the pterosaurs bent their wings at the junction of the metacarpals and the fingers.
This is different than their descendant modern birds that have fused the hand so they no longer bend at the junction of the metacarpals and the fingers. Instead modern birds bend at the wrist.