X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ftime%2Ftimezone.cpp;h=a2cd7a3f772743c7fe9ac06fde3042fd6ab28d98;hp=873829d667111f86a3e96dbd164d89606f5183d1;hb=699670a264c7fc5a0b05c2d258a7552f5c594bd1;hpb=1f0843257065789231a9949e0a81b79afd7bbebe diff --git a/source/time/timezone.cpp b/source/time/timezone.cpp index 873829d..a2cd7a3 100644 --- a/source/time/timezone.cpp +++ b/source/time/timezone.cpp @@ -2,6 +2,7 @@ #ifdef WIN32 #include #else +#include #include #endif #include @@ -60,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) { @@ -90,6 +91,7 @@ TimeZone get_local_timezone() name = ptr+abbrind; } + delete[] buf; } close(fd);