summaryrefslogtreecommitdiff
path: root/plugins/Weather
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Weather')
-rw-r--r--plugins/Weather/src/weather.h4
-rw-r--r--plugins/Weather/src/weather_update.cpp16
2 files changed, 11 insertions, 9 deletions
diff --git a/plugins/Weather/src/weather.h b/plugins/Weather/src/weather.h
index 694a475549..e44a2c4a9a 100644
--- a/plugins/Weather/src/weather.h
+++ b/plugins/Weather/src/weather.h
@@ -67,8 +67,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define NOSTATUSDATA 1
// limits
-#define MAX_TEXT_SIZE 4096
-#define MAX_DATA_LEN 1024
+#define MAX_TEXT_SIZE 4096
+#define MAX_DATA_LEN 1024
// db info mangement mode
#define WDBM_REMOVE 1
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp
index a4186be1c6..8029b13821 100644
--- a/plugins/Weather/src/weather_update.cpp
+++ b/plugins/Weather/src/weather_update.cpp
@@ -401,7 +401,7 @@ int GetWeatherData(HANDLE hContact)
GetSvc(Svc);
// check for invalid station
- if (id[0] == 0) return INVALID_ID;
+ if (id[0] == 0) return INVALID_ID;
if (Svc[0] == 0) return INVALID_SVC;
// get the update strings (loaded to memory from ini files)
@@ -412,25 +412,27 @@ int GetWeatherData(HANDLE hContact)
WIDATAITEMLIST* Item;
WORD cond = NA;
char loc[256];
- char* szId = mir_t2a( id );
- for ( int i=0; i<4; ++i) {
+ for (int i=0; i<4; ++i) {
// generate update URL
switch(i) {
case 0:
- _snprintf(loc, SIZEOF(loc), Data->UpdateURL, szId);
+ _snprintf(loc, SIZEOF(loc), Data->UpdateURL, _T2A(id));
break;
case 1:
- _snprintf(loc, SIZEOF(loc), Data->UpdateURL2, szId);
+ _snprintf(loc, SIZEOF(loc), Data->UpdateURL2, _T2A(id));
break;
case 2:
- _snprintf(loc, SIZEOF(loc), Data->UpdateURL3, szId);
+ _snprintf(loc, SIZEOF(loc), Data->UpdateURL3, _T2A(id));
break;
case 3:
- _snprintf(loc, SIZEOF(loc), Data->UpdateURL4, szId);
+ _snprintf(loc, SIZEOF(loc), Data->UpdateURL4, _T2A(id));
break;
+
+ default:
+ continue;
}
if ( loc[0] == 0 )