X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;ds=sidebyside;f=Ada95%2Fsrc%2Fterminal_interface-curses-forms.adb;fp=Ada95%2Fsrc%2Fterminal_interface-curses-forms.adb;h=8b01e164299d7c7c546f9ebfa8eebb5410c493fa;hb=4c309ad3b124eff80aa6b54018b5cc9f1e3d116d;hp=e3c053c61e102cade946d040d44954970613bb27;hpb=2983c16f31fb7f25f32da1490d2cfb8397afbefc;p=ncurses.git diff --git a/Ada95/src/terminal_interface-curses-forms.adb b/Ada95/src/terminal_interface-curses-forms.adb index e3c053c6..8b01e164 100644 --- a/Ada95/src/terminal_interface-curses-forms.adb +++ b/Ada95/src/terminal_interface-curses-forms.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 1998,2004 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2004,2008 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -35,8 +35,8 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: --- $Revision: 1.25 $ --- $Date: 2004/08/21 21:37:00 $ +-- $Revision: 1.26 $ +-- $Date: 2008/07/26 18:50:44 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; @@ -759,7 +759,7 @@ package body Terminal_Interface.Curses.Forms is P : Pointer := C_Fields (Frm); begin - if P = null or else Index not in 1 .. Field_Count (Frm) then + if P = null or else Index > Field_Count (Frm) then raise Form_Exception; else P := P + ptrdiff_t (C_Int (Index) - 1);