Fix erroneous assignment in an if statement.

Should have been a comparison.