OSDN Git Service

Update weather.c
authorsu8 <coyim@nypato.com>
Sat, 18 Nov 2017 16:33:00 +0000 (18:33 +0200)
committerGitHub <noreply@github.com>
Sat, 18 Nov 2017 16:33:00 +0000 (18:33 +0200)
src/weather.c

index 39a1d35..8c29f66 100644 (file)
@@ -76,6 +76,7 @@ read_curl_data_cb(char *data, size_t size, size_t nmemb, char *str1) {
         if (0 == got_temp) {
           if ('e' == *(ptr+1) && 'm' == *(ptr+2) && 'p' == *(ptr+3)) {
             if ('-' == *(ptr+6)) {
+              *str1++ = '-';
               if (0 != (isdigit((unsigned char) *(ptr+7)))) {
                 *str1++ = *(ptr+7);
                 if (0 != (isdigit((unsigned char) *(ptr+8)))) {