mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix signed int overflow warning.
This commit is contained in:
parent
8d723f1b1e
commit
2c910ed1bb
@ -43,14 +43,13 @@ static const gint64 pten[] = { 1, 10, 100, 1000, 10000, 100000, 1000000,
|
||||
10000000, 100000000, 1000000000, 10000000000,
|
||||
100000000000, 1000000000000, 10000000000000,
|
||||
100000000000000, 10000000000000000,
|
||||
100000000000000000, 1000000000000000000,
|
||||
10000000000000000000};
|
||||
100000000000000000, 1000000000000000000};
|
||||
#define POWTEN_OVERFLOW -5
|
||||
|
||||
static inline gint64
|
||||
powten (int exp)
|
||||
{
|
||||
if (exp > 19 || exp < -19)
|
||||
if (exp > 18 || exp < -18)
|
||||
return POWTEN_OVERFLOW;
|
||||
return exp < 0 ? -pten[-exp] : pten[exp];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user