Is it correct to change a syntax error in code that has been posted as part of a question?
After pointing out in the comments that there was a syntax error in the code posted in this question (in particular in this revision), somebody then told me they though it was just "a typo" and proceeded to fix the syntax.
I tried to point out that I don't agree with assuming that syntax errors are always typos, because the OP might not be using software with syntax-highlighting (e.g. notepad, wordpad, etc), and the syntax error might actually be a major part of the problem.
Changing it without confirmation from the OP that it was a typo on the creation of the question could result in people being sent on a wild goose chase.
In this particular case the major part of the problem appears to something complete different, but I still don't think we can always assume syntax errors in posted code are a result of typos.
So, my question remains, should we be changing syntax errors in questions?
Update
I agree with all comments so far... we should NOT assume syntax errors in code are simple typos, and certainly NOT change them on behalf of the OP (unless confirmed by the OP).
I have rolled back the question to the original, and then formatted it to make it more readable (but left in the syntax error / "typo").
I have also placed the following comment for the original editor to explain the situation...
@VisioN, sorry, but I have rolled-back this to the original revision of the question, because I do not believe anybody should assume that the code in the question has an error due to a "typo". Please see this Meta discussion for my reasons.