From 19ed4d89b27c4c3484173816a9317f89bd1dd169 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 23 Feb 2004 01:16:22 +0000 Subject: [PATCH] use localtime_r, not localtime --- stepmania/src/ConditionalBGA.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stepmania/src/ConditionalBGA.cpp b/stepmania/src/ConditionalBGA.cpp index e62878c3fa..a74076d9f3 100644 --- a/stepmania/src/ConditionalBGA.cpp +++ b/stepmania/src/ConditionalBGA.cpp @@ -557,8 +557,9 @@ void ConditionalBGA::CheckBgaRequirements(BgaCondInfo info) { time_t rawtime; time(&rawtime); - struct tm* ptm = localtime(&rawtime); - int month = ptm->tm_mon; /* Month 0..11 */ + struct tm ptm; + localtime_r( &rawtime, &ptm ); + int month = ptm.tm_mon; /* Month 0..11 */ LOG->Info("Month: %d",month); bool foundvalidmonth = false; for(unsigned d=0;dtm_mday; /* day in the month */ + struct tm ptm; + localtime_r( &rawtime, &ptm ); + int day = ptm.tm_mday; /* day in the month */ LOG->Info("DAy: %d",day); bool foundvalidday = false; for(unsigned d=0;d