I have encountered this before as well. On the "tug of war" blue-grey battle screen where the action unfolds step by step, the bar will slowly fill up one way or the other - indicating, I assumed, that the side who lost his little half of the bar is withdrawing. However, when I exited and the battle resolution screen came up, the side who seemed to have lost had instead won, though the casualties stayed the same - essentially one side retreated instead of the other. This happened a few times before, but as far as I could tell, only in near draws. Having 0 knowledge of programming, I am hesitant to offer a hypothesis as to what that might mean.
"Hard pressed on my right; my left is in retreat. My center is yielding. Impossible to maneuver. Situation excellent. I am attacking."
-Gen. Joffre, before the battle of the Marne