[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: x_color.nw



  User: mike    
  Date: 05/10/23 19:46:42

  Modified:    .        x_color.nw
  Log:
  Fixed fencepost error on colors index test, array runs from 0 to MAX_COLORS-1,
  
  not MAX_COLORS.
  
  
  
  
  Revision  Changes    Path
  1.7       +1 -1      eda/geda/devel/gschem/noweb/x_color.nw
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_color.nw
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/x_color.nw,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- x_color.nw	4 Feb 2005 04:39:30 -0000	1.6
  +++ x_color.nw	23 Oct 2005 23:46:42 -0000	1.7
  @@ -228,7 +228,7 @@
   int
   x_color_get_name(int index, char *string)
   {
  -  if (index > MAX_COLORS) {
  +  if ((index >= MAX_COLORS) || (index < 0)) {
       return(FALSE);
     }