changes for materials to treat them as shorts not int/chars (since they are stored...
[blender-staging.git] / source / blender / editors / mesh / meshtools.c
index 32e52916b77a6d3efc91745a53f0287e45cad610..526bf177ab7b613ac1bfadb010d4c8f8fce8e634 100644 (file)
@@ -217,7 +217,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
                        
                        if(me->totvert) {
                                /* Add this object's materials to the base one's if they don't exist already (but only if limits not exceeded yet) */
-                               if(totcol < MAXMAT-1) {
+                               if(totcol < MAXMAT) {
                                        for(a=1; a<=base->object->totcol; a++) {
                                                ma= give_current_material(base->object, a);
 
@@ -231,7 +231,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
                                                        }
                                                        totcol++;
                                                }
-                                               if(totcol>=MAXMAT-1) 
+                                               if(totcol >= MAXMAT)
                                                        break;
                                        }
                                }