From 2360487b198a9cabc91918e6a48020acdbefc1f4 Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 17 Jun 2006 18:25:12 +0000 Subject: [PATCH] getGMTstring: remove leading space, cleanup --- src/Main/fg_props.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Main/fg_props.cxx b/src/Main/fg_props.cxx index dbe4e537d..aed7cbf0f 100644 --- a/src/Main/fg_props.cxx +++ b/src/Main/fg_props.cxx @@ -316,11 +316,10 @@ setDateString (const char * date_string) static const char * getGMTString () { - static char buf[16]; // FIXME + static char buf[16]; struct tm *t = globals->get_time_params()->getGmt(); - sprintf(buf, " %.2d:%.2d:%.2d", - t->tm_hour, t->tm_min, t->tm_sec); - // cout << t << " " << buf << endl; + snprintf(buf, 16, "%.2d:%.2d:%.2d", + t->tm_hour, t->tm_min, t->tm_sec); return buf; }