summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-22 15:30:59 -0400
committerirungentoo <irungentoo@gmail.com>2013-07-22 15:30:59 -0400
commit37b7e4c12e9c9fdbf1544ac5325af3c8cd7020bb (patch)
tree246046254ed8dac3cd08dc3424ba6a77dd402a7e
parent55361eac6f12fb2b2aaec427129aae65f5eb5e6b (diff)
Merge stuff from notadecent.
-rw-r--r--testing/nTox.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/testing/nTox.c b/testing/nTox.c
index f7948778..8e9a5456 100644
--- a/testing/nTox.c
+++ b/testing/nTox.c
@@ -1,7 +1,6 @@
1#include "nTox.h" 1#include "nTox.h"
2#include <stdio.h> 2#include <stdio.h>
3#include <time.h> 3#include <time.h>
4#include <string.h>
5#ifdef WIN32 4#ifdef WIN32
6#define c_sleep(x) Sleep(1*x) 5#define c_sleep(x) Sleep(1*x)
7#else 6#else
@@ -192,7 +191,10 @@ void print_message(int friendnumber, uint8_t * string, uint16_t length)
192 struct tm * timeinfo; 191 struct tm * timeinfo;
193 time ( &rawtime ); 192 time ( &rawtime );
194 timeinfo = localtime ( &rawtime ); 193 timeinfo = localtime ( &rawtime );
195 sprintf(msg, "[%d] %s <%s> %s", friendnumber, asctime (timeinfo), name, string); // someone please fix this 194 char* temp = asctime(timeinfo);
195 int len = strlen(temp);
196 temp[len-1]='\0';
197 sprintf(msg, "[%d] %s <%s> %s", friendnumber, temp, name, string); // someone please fix this
196 free(name); 198 free(name);
197 new_lines(msg); 199 new_lines(msg);
198} 200}