summaryrefslogtreecommitdiffhomepage
path: root/nGenEx/Physical.cpp
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 16:46:21 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 16:46:21 +0000
commit396c12ee73193f4ac3665ecac2f634fc0b046697 (patch)
tree16edb33b60f95f6bda93bc84b3f2eb81e316ba1d /nGenEx/Physical.cpp
parent50971e84e295033941fac5291b08e593541fe945 (diff)
downloadstarshatter-396c12ee73193f4ac3665ecac2f634fc0b046697.zip
starshatter-396c12ee73193f4ac3665ecac2f634fc0b046697.tar.gz
starshatter-396c12ee73193f4ac3665ecac2f634fc0b046697.tar.bz2
Fixes for unsafe string handling, variable scoping errors.
Diffstat (limited to 'nGenEx/Physical.cpp')
-rw-r--r--nGenEx/Physical.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/nGenEx/Physical.cpp b/nGenEx/Physical.cpp
index b6c132c..74a0f6d 100644
--- a/nGenEx/Physical.cpp
+++ b/nGenEx/Physical.cpp
@@ -39,7 +39,7 @@ Physical::Physical()
radius(0.0f), mass(1.0f), integrity(1.0f), life(-1), dir(0),
g_accel(0.0f), Do(0.0f), CL(0.0f), CD(0.0f), alpha(0.0f), stall(0.0f)
{
- strcpy(name, "unknown object");
+ strcpy_s(name, "unknown object");
}
// +--------------------------------------------------------------------+
@@ -56,7 +56,7 @@ Physical::Physical(const char* n, int t)
radius(0.0f), mass(1.0f), integrity(1.0f), life(-1), dir(0),
g_accel(0.0f), Do(0.0f), CL(0.0f), CD(0.0f), alpha(0.0f), stall(0.0f)
{
- strncpy(name, n, NAMELEN-1);
+ strncpy_s(name, n, NAMELEN-1);
name[NAMELEN-1] = 0;
}