fix assignment in if statement issue

because it doesn't match the logic either.
Merge pull request #2 from underrun/master

fix assignment in if statement issue