[Ada] Prevent crash in Put_Scaled
authorBob Duff <duff@adacore.com>
Mon, 12 Aug 2019 09:01:14 +0000 (09:01 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 12 Aug 2019 09:01:14 +0000 (09:01 +0000)
commit18ba4b0dbd971fc879c8db3cbe50726c8bd7c25e
tree25ec535fede4776b7031e22dfb6509150e949539
parent0e5f9f5020f798333b7ca2fd10cd48d8cfc09e6c
[Ada] Prevent crash in Put_Scaled

This patch fixes a bug in Put_Scaled, which causes a crash when checks
are on.

2019-08-12  Bob Duff  <duff@adacore.com>

gcc/ada/

* libgnat/a-tifiio.adb (Put_Scaled): Prevent AA from being
negative, since Field is range 0 .. something.

From-SVN: r274300
gcc/ada/ChangeLog
gcc/ada/libgnat/a-tifiio.adb