* ada-lang.c (ada_modulus): Correct to avoid sign problem with

moduli >= 2**31.
This commit is contained in:
Joel Brobecker 2008-09-30 21:53:32 +00:00
parent b1f33ddde1
commit d37209fddb
2 changed files with 7 additions and 2 deletions

View file

@ -9626,7 +9626,7 @@ ada_is_modular_type (struct type *type)
ULONGEST
ada_modulus (struct type * type)
{
return (ULONGEST) TYPE_HIGH_BOUND (type) + 1;
return (ULONGEST) (unsigned int) TYPE_HIGH_BOUND (type) + 1;
}