From ca103e1e5bc5cd629b37409ae1dde4906e93185e Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 28 Sep 2008 15:56:47 +0000 Subject: [PATCH] Windows has no asprintf. Boohoo. --- vsleeptimer.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vsleeptimer.cc b/vsleeptimer.cc index 79ea1f9..0342a64 100644 --- a/vsleeptimer.cc +++ b/vsleeptimer.cc @@ -160,10 +160,10 @@ void Sleeptimer::threadMethod() if (sec<31 && sec>-1) { VCountdown* count = new VCountdown(); - char* temp; - asprintf(&temp, "0:%02d", sec); + char* temp = (char*)malloc(20); + sprintf(temp, "0:%02d", sec); count->draw(temp); - free (temp); + free(temp); Message* m1 = new Message(); m1->message = Message::ADD_VIEW; m1->to = BoxStack::getInstance(); -- 2.39.5