summaryrefslogtreecommitdiffhomepage
path: root/Stars45/NavDlg.cpp
diff options
context:
space:
mode:
authorrhyskidd@gmail.com <rhyskidd@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-07-16 15:54:06 +0000
committerrhyskidd@gmail.com <rhyskidd@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-07-16 15:54:06 +0000
commit7084c7521db8508c09624345700f4c8a83a97c01 (patch)
tree754003d719f19d493d4079eb5e4f4140a99e656b /Stars45/NavDlg.cpp
parent6d8a4e7be5ac0ec59e8bd53c8814e8680291a4cb (diff)
downloadstarshatter-7084c7521db8508c09624345700f4c8a83a97c01.zip
starshatter-7084c7521db8508c09624345700f4c8a83a97c01.tar.gz
starshatter-7084c7521db8508c09624345700f4c8a83a97c01.tar.bz2
PVS-Studio fix: V618 It’s dangerous to call the 'sprintf_s' function in such a manner, as the line being passed could contain format specification. The example of the safe code: printf("%s", str);
Diffstat (limited to 'Stars45/NavDlg.cpp')
-rw-r--r--Stars45/NavDlg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Stars45/NavDlg.cpp b/Stars45/NavDlg.cpp
index 7ddd3cd..898636a 100644
--- a/Stars45/NavDlg.cpp
+++ b/Stars45/NavDlg.cpp
@@ -765,7 +765,7 @@ NavDlg::UpdateSelection()
sprintf_s(shield, "%03d", sel_ship->ShieldStrength());
sprintf_s(hull, "%03d", sel_ship->HullStrength());
- sprintf_s(range, Game::GetText("NavDlg.not-avail").data());
+ sprintf_s(range, "%s", Game::GetText("NavDlg.not-avail").data());
if (ship) {
FormatNumberExp(range, Point(sel_ship->Location()-ship->Location()).length()/1000);