Fixed MSVC build
This commit is contained in:
parent
720ce7fc71
commit
2d05f10a44
|
@ -190,7 +190,7 @@ gui_render_panel(Gui *gui, unsigned int width, unsigned int height, Camera *cam)
|
|||
void
|
||||
gui_log(const char *fmt, ...)
|
||||
{
|
||||
char buffer[log_data.strlen];
|
||||
char buffer[200];
|
||||
char *new_message;
|
||||
unsigned int i;
|
||||
char tstamp[10];
|
||||
|
@ -200,7 +200,7 @@ gui_log(const char *fmt, ...)
|
|||
#ifndef _MSC_VER
|
||||
vsprintf(buffer, fmt, args);
|
||||
#else // _MSC_VER
|
||||
vsprintf_s(buffer, log_data.strlen, fmt, args);
|
||||
vsprintf_s(buffer, 200, fmt, args);
|
||||
#endif // _MSC_VER
|
||||
va_end(args);
|
||||
|
||||
|
|
|
@ -127,7 +127,14 @@ timestamp(char *tstamp, size_t sz)
|
|||
struct tm *tm_info;
|
||||
|
||||
time(&cTime);
|
||||
#ifndef _MSC_VER
|
||||
tm_info = localtime(&cTime);
|
||||
#else // _MSC_VER
|
||||
tm_info = ec_malloc(sizeof(struct tm));
|
||||
localtime_s(tm_info, &cTime);
|
||||
#endif // _MSC_VER
|
||||
|
||||
strftime(tstamp, sz, "%H:%M:%S", tm_info);
|
||||
|
||||
free(tm_info);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue