summaryrefslogtreecommitdiff
path: root/plugins/Weather
diff options
context:
space:
mode:
authorVlad Mironov <mironych@googlemail.com>2013-09-03 03:56:30 +0000
committerVlad Mironov <mironych@googlemail.com>2013-09-03 03:56:30 +0000
commit61acb52e0da259928875a286104d35bfef584e56 (patch)
tree927a844d621cf1e5ba504d7623a392a3d0708219 /plugins/Weather
parentd34ee7f78c43aef81da67b56f7a856a5ad1bcb32 (diff)
Weather:
fixed buffer overrun when negative temperature. git-svn-id: http://svn.miranda-ng.org/main/trunk@5910 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather')
-rw-r--r--plugins/Weather/src/weather_conv.cpp2
1 files changed, 1 insertions, 1 deletions
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