--- \dll\iup\a\src\iup_attrib.c	Thu Oct 03 21:48:51 2019
+++ iup_attrib.c	Mon Nov 04 13:51:57 2019
@@ -287,12 +287,12 @@
 
   /* store the names before updating so we can add or remove attributes during the update */
   name = iupTableFirst(ih->attrib);
-  while (name)
+  while (name && i < count)
   {
     if (!iupATTRIB_ISINTERNAL(name))
     {
       name_array[i] = name;
-      i++;
+      ++i;
     }
 
     name = iupTableNext(ih->attrib);
