Skip to content

Commit 655bddd

Browse files
[account.cpp] comparing identical accts returns 0
bypassing many comparisons
1 parent 001c690 commit 655bddd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libgnucash/engine/Account.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2359,9 +2359,9 @@ xaccAccountOrder (const Account *aa, const Account *ab)
23592359
const char *da, *db;
23602360
int ta, tb, result;
23612361

2362-
if ( aa && !ab ) return -1;
2363-
if ( !aa && ab ) return +1;
2364-
if ( !aa && !ab ) return 0;
2362+
if (aa == ab) return 0;
2363+
if (!ab) return -1;
2364+
if (!aa) return +1;
23652365

23662366
priv_aa = GET_PRIVATE(aa);
23672367
priv_ab = GET_PRIVATE(ab);

0 commit comments

Comments
 (0)