]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/src/terminal_interface-curses-forms.adb
ncurses 5.7 - patch 20081122
[ncurses.git] / Ada95 / src / terminal_interface-curses-forms.adb
index e3c053c61e102cade946d040d44954970613bb27..8b01e164299d7c7c546f9ebfa8eebb5410c493fa 100644 (file)
@@ -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);