/*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
{
static char time[1024];
- strcpy(time, "");
+ time[0] = 0;
int hours = t / 3600;
int minutes = (t % 3600) / 60;
int seconds = (t % 60);
- sprintf(time, "%dh %dm %ds", hours, minutes, seconds);
+ snprintf(time, sizeof time, "%dh %dm %ds", hours, minutes, seconds);
return time;
}