michaeldickens / Typing

https://github.com/michaeldickens/Typing
69 stars 18 forks source link

Potentially uninitialized variables #4

Closed FrankDMartinez closed 12 years ago

FrankDMartinez commented 12 years ago

I notice in gameComputer() in accessories.c the variables bestp and bestc might not be initialized before use. What would You say are sensible defaults for these variables?

michaeldickens commented 12 years ago

Hi, thanks for taking the time to edit my program and leave comments.

If bestp and bestc are uninitialized, there must have been a problem. So I'd suggest bestp = -1 and bestc = '\0'.

On 7/20/12 11:58 AM, xuinkrbin wrote:

I notice in gameComputer() in accessories.c the variables bestp and bestc might not be initialized before use. What would You say are sensible defaults for these variables?


Reply to this email directly or view it on GitHub: https://github.com/MTGandP/Typing/issues/4

FrankDMartinez commented 12 years ago

Great, thanks!