From 61acb52e0da259928875a286104d35bfef584e56 Mon Sep 17 00:00:00 2001 From: Vlad Mironov Date: Tue, 3 Sep 2013 03:56:30 +0000 Subject: Weather: fixed buffer overrun when negative temperature. git-svn-id: http://svn.miranda-ng.org/main/trunk@5910 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Weather/src/weather_conv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/Weather/src/weather_conv.cpp') diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index b26e15cd32..c986ab7530 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -63,7 +63,7 @@ static void numToStr(double num, TCHAR *str, size_t strSize) w /= 10; } - if (i < 0 && (w || r)) *(str++) = '-'; + if (i < 0 && (w || r)) w = -w; if (r) mir_sntprintf(str, strSize, _T("%i.%i"), w, r); else -- cgit v1.2.3