There is a simple way to decide what a dogs intentions are if you have a pistol.
Squat down and extend the pistol out as far as you can reach. The dog will try to bite the nearest thing to him. If he bites the pistol,pull the trigger and you don't have to worry about missing or where the bullet went.
If the dog stops before that, No Harm Done.