From ae037b23153d60b19c95960c0c6e1e1ee61a906b Mon Sep 17 00:00:00 2001 From: uruk Date: Mon, 11 Aug 2014 20:43:08 +0200 Subject: CGE2: Use snprintf() instead of sprintf(). --- engines/cge2/cge2_main.cpp | 2 +- engines/cge2/text.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index 7900eefb86..7c4a111d1f 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -387,7 +387,7 @@ void CGE2Engine::movie(const char *ext) { return; char fn[12]; - sprintf(fn, "CGE%s", ext); + snprintf(fn, 12, "CGE%s", ext); if (_resman->exist(fn)) { int now = _now; diff --git a/engines/cge2/text.cpp b/engines/cge2/text.cpp index 1da310ccbd..d51c04843d 100644 --- a/engines/cge2/text.cpp +++ b/engines/cge2/text.cpp @@ -190,7 +190,7 @@ void Text::sayTime(Sprite *spr) { _vm->_system->getTimeAndDate(curTime); char t[6]; - sprintf(t, "%d:%02d", curTime.tm_hour, curTime.tm_min); + snprintf(t, 6, "%d:%02d", curTime.tm_hour, curTime.tm_min); say(t, spr); } -- cgit v1.2.3