[PATCH] Fix use of "=" in if statement where "==" was intended

Christian Stimming stimming at tuhh.de
Sat Feb 7 11:45:58 EST 2009


-    if ((aw->type = ACCT_TYPE_STOCK) || (aw->type = ACCT_TYPE_MUTUAL)) 
+    if ((aw->type == ACCT_TYPE_STOCK) || (aw->type == ACCT_TYPE_MUTUAL)) 

Uh oh! Unbelievable. Too bad we didn't catch this at the time when it was 
committed. The code is from r17657, which was a patch from 
bug#432457 - "Security/stock import should follow tutorial regarding Account 
Name", patch by David Reiser, committed by myself on 2008-10-25. I wonder why 
nobody was confused by erroneous behaviour here...

Thanks a lot!

Christian


More information about the gnucash-devel mailing list