X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftime%2Ftimezone.cpp;h=a2cd7a3f772743c7fe9ac06fde3042fd6ab28d98;hb=eeb6b89120ab259702f103da01bfd8c06f285e7b;hp=7c837484c705239f06537e2781209b396c1ef4ba;hpb=8e77a1c6747dddf585d653c34e9806e976d2c73a;p=libs%2Fcore.git diff --git a/source/time/timezone.cpp b/source/time/timezone.cpp index 7c83748..a2cd7a3 100644 --- a/source/time/timezone.cpp +++ b/source/time/timezone.cpp @@ -1,18 +1,12 @@ -/* $Id$ - -This file is part of libmspcore -Copyright © 2008-2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include #ifdef WIN32 #include #else +#include #include #endif -#include #include +#include #include "timestamp.h" #include "timezone.h" #include "units.h" @@ -67,7 +61,7 @@ TimeZone get_local_timezone() long typecnt = get_long(ptr); long charcnt = get_long(ptr); int size = timecnt*5+typecnt*6+isgmtcnt+isstdcnt+leapcnt*8+charcnt; - char buf[size]; + char *buf = new char[size]; len = read(fd, buf, size); if(len==size) { @@ -97,6 +91,7 @@ TimeZone get_local_timezone() name = ptr+abbrind; } + delete[] buf; } close(fd);