adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[adonthell-commits] master 99c6b3e 2/2: FIXED compiler warning caused by


From: Kai Sterker
Subject: [adonthell-commits] master 99c6b3e 2/2: FIXED compiler warning caused by wrong string format specifiers
Date: Sun, 4 Sep 2022 09:01:24 -0400 (EDT)

branch: master
commit 99c6b3e2ee730689952172d98400f605827f7cb2
Author: Kai Sterker <kai.sterker@gmail.com>
Commit: Kai Sterker <kai.sterker@gmail.com>

    FIXED compiler warning caused by wrong string format specifiers
---
 src/data_screen.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/data_screen.cc b/src/data_screen.cc
index cbd99fd..ca6630f 100644
--- a/src/data_screen.cc
+++ b/src/data_screen.cc
@@ -164,7 +164,7 @@ void data_screen::init ()
     // If we're saving the game, add "Empty Slot"
     if (mode == SAVE_SCREEN)
     {
-        sprintf (gametime, "Day %i - %02i:%02i", gamedate::day (), 
+        snprintf (gametime, sizeof(gametime), "Day %hi - %02hi:%02hi", 
gamedate::day (), 
             gamedate::hour (), gamedate::minute ());
         
         shot = new win_image ();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]