Re: ok, tell me THIS isn't a bug!
- Posted by useless Aug 10, 2010
- 1923 views
I found the bug, and the fix. It is a combination of bad coding style by whoever wrote chat_server.ew, and the interpreter not catching that each loop thru (essentially) "while 1 do" defined/created a new variable of the same name, which the interpreter should have noticed and chastised the programmer about.
I moved all these:
object got_data
object sock_data
object client
up to under the start of the procedure main() where all good var declarations go, and the bug absolutely disappeared.
I didn't/don't complain about the declaration of vars down in the code, but praps it shouldn't be released like that into the wild, in mature-ish code? And the interpreter should be smart enough to know "hey, we already have this variable".
useless