Bug #607246: In qof_string_number_compare_func, use base 10 and do not allow octals to sneak in.

Otherwise, transaction number 0108 (octal 010=8) will sort before 0107 (octal 0107=71).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18578 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler 2010-01-21 22:52:56 +00:00
parent fa81ae0808
commit d9bb98bef8

View File

@ -207,8 +207,8 @@ qof_string_number_compare_func (gpointer a, gpointer b, gint options,
if (s1 && !s2) return 1;
// Convert to integers and test
i1 = strtol(s1, &sr1, 0);
i2 = strtol(s2, &sr2, 0);
i1 = strtol(s1, &sr1, 10);
i2 = strtol(s2, &sr2, 10);
if (i1 < i2) return -1;
if (i1 > i2) return 1;