From 69d78f139fe61e23897c09b8018828025c70344b Mon Sep 17 00:00:00 2001 From: andreja6 Date: Thu, 1 Nov 2018 13:52:11 -0700 Subject: [PATCH] Removed unsafe functions --- DataModelInstance.cpp | 4 ++-- LevelInstance.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DataModelInstance.cpp b/DataModelInstance.cpp index ae18fc3..cb92c7d 100644 --- a/DataModelInstance.cpp +++ b/DataModelInstance.cpp @@ -67,9 +67,9 @@ void DataModelInstance::drawMessage(RenderDevice* rd) } } char brkc[12]; - sprintf(brkc, "%d", brickCount); + sprintf_s(brkc, "%d", brickCount); char instc[12]; - sprintf(instc, "%d", instCount); + sprintf_s(instc, "%d", instCount); message = "Bricks: "; message += brkc; message += " Snaps: "; diff --git a/LevelInstance.cpp b/LevelInstance.cpp index 89f6be7..de4463b 100644 --- a/LevelInstance.cpp +++ b/LevelInstance.cpp @@ -36,8 +36,8 @@ std::vector LevelInstance::getProperties() PIT_EDIT)); - sprintf(timerTxt, "%g", timer); - sprintf(scoreTxt, "%d", score); + sprintf_s(timerTxt, "%g", timer); + sprintf_s(scoreTxt, "%d", score); properties.push_back(createPGI("Gameplay", "InitialTimerValue", "The ammount of time in seconds the player has to complete this level.\r\n\r\nPut 0 if time is limitless.",