project-navigation
Personal tools

Author Topic: Minor bug: Infinite loop in cl_hud.cpp  (Read 1697 times)

Offline polyvios

  • Cannon Fodder
  • **
  • Posts: 8
    • View Profile
Minor bug: Infinite loop in cl_hud.cpp
« on: October 11, 2012, 08:26:38 pm »
Hello everyone, thanks for a great game,

In one of the recent commits, the declaration of variable "hand" in HUD_CheckFiremodeReservation, moved inside the loop src/client/battlescape/cl_hud.cpp:205
This causes the do..while to loop forever, as there needs to be data flow through "hand" from one iteration to the next for the loop to terminate.  To fix, move the declaration back to the function start.

cheers,
-polyvios

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Minor bug: Infinite loop in cl_hud.cpp
« Reply #1 on: October 13, 2012, 04:44:42 pm »
I wouldn't call it a minor bug, anyway its already fixed, thank for reporting.