Something weird happened in my game yesterday. I was battling the last member of the Riches and my Vanillish got KO'd by Haxorus, but as it fainted, I thought I saw 1 HP left on its bar. Sure enough, the "select a pokemon" screen indicated that Vanillish had 1 HP and had not fainted. I tried to send it back in battle but it said "That pokemon is already in battle!"
At this point, I had no choice but to send out another pokemon. I sent out Unfezant, and the game froze as soon as it came out of its pokeball. *facepalm*
I have no idea what might have caused this. I am pretty sure it was not a simple rounding error between 0 and 1 HP remaining, because Haxorus' Dragon Pulse should have killed Vanillish easily. (In other words, it was not a borderline case.)