Fix assignment in condition

Corrects the use of assignment operator ('=') rather than boolean ('==') in conditional expression.