replace sprintf -> strcpy where its not needed.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 12 Mar 2013 12:47:57 +0000 (12:47 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 12 Mar 2013 12:47:57 +0000 (12:47 +0000)
source/blender/blenkernel/intern/pointcache.c
source/blender/editors/transform/transform_constraints.c

index 6276bce..c318356 100644 (file)
@@ -3511,7 +3511,7 @@ void BKE_ptcache_update_info(PTCacheID *pid)
                else if (totframes && cache->totpoint)
                        BLI_snprintf(cache->info, sizeof(cache->info), IFACE_("%i points found!"), cache->totpoint);
                else
-                       BLI_snprintf(cache->info, sizeof(cache->info), IFACE_("No valid data to read!"));
+                       BLI_strncpy(cache->info, IFACE_("No valid data to read!"), sizeof(cache->info));
                return;
        }
 
index 3088b96..f302620 100644 (file)
@@ -865,11 +865,11 @@ static void setNearestAxis2d(TransInfo *t)
        /* no correction needed... just use whichever one is lower */
        if (abs(t->mval[0] - t->con.imval[0]) < abs(t->mval[1] - t->con.imval[1]) ) {
                t->con.mode |= CON_AXIS1;
-               BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along Y axis"));
+               BLI_strncpy(t->con.text, IFACE_(" along Y axis"), sizeof(t->con.text));
        }
        else {
                t->con.mode |= CON_AXIS0;
-               BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along X axis"));
+               BLI_strncpy(t->con.text, IFACE_(" along X axis"), sizeof(t->con.text));
        }
 }