rpms/xwota/F-11 xwota-0.4-empty-fields.patch,NONE,1.1
Lucian Langa
lucilanga at fedoraproject.org
Thu Jan 14 20:10:20 UTC 2010
- Previous message: rpms/isomaster/devel isomaster-1.3.6-snprintf.patch, NONE, 1.1 isomaster-1.3.7-optflags.diff, NONE, 1.1 .cvsignore, 1.10, 1.11 isomaster.spec, 1.17, 1.18 sources, 1.10, 1.11
- Next message: rpms/pyxattr/F-11 pyxattr.spec,1.10,1.11 sources,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: lucilanga
Update of /cvs/pkgs/rpms/xwota/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14241
Added Files:
xwota-0.4-empty-fields.patch
Log Message:
* Thu Jan 14 2010 Lucian Langa <cooly at gnome.eu.org> - 0.4-8
- fix for bug (#555286)
xwota-0.4-empty-fields.patch:
station_info_callback.c | 22 +++++++++++++++++-----
stuff.c | 9 +++++----
2 files changed, 22 insertions(+), 9 deletions(-)
--- NEW FILE xwota-0.4-empty-fields.patch ---
diff -Naur xwota-0.4/src/station_info_callback.c xwota-0.4-mod/src/station_info_callback.c
--- xwota-0.4/src/station_info_callback.c 2006-07-15 16:33:40.000000000 +0300
+++ xwota-0.4-mod/src/station_info_callback.c 2010-01-14 20:10:52.000000000 +0200
@@ -2,6 +2,7 @@
# include <config.h>
#endif
+#include <string.h>
#include <gtk/gtk.h>
#include "station_info_callback.h"
@@ -54,11 +55,22 @@
latitude_ = gtk_entry_get_text(GTK_ENTRY(latitude));
longitude_ = gtk_entry_get_text(GTK_ENTRY(longitude));
- call_ = uppercase(call_);
- state_ = uppercase(state_);
- grid_ = uppercase(grid_);
-
-
+ if (strlen(call_))
+ call_ = uppercase(call_);
+ else
+ call_ = "NOCALL";
+
+ if (strlen(state_))
+ state_ = uppercase(state_);
+ else
+ state_ = "";
+
+ if (strlen(grid_))
+ grid_ = uppercase(grid_);
+ else
+ grid_ = "";
+
+
//printf("Call: %s\n%s\n%s\n%s\n%s\n%s\n%s\n",call,country,state,grid,county,latitude, longitude);
xwota_settings.call = g_strdup(call_);
diff -Naur xwota-0.4/src/stuff.c xwota-0.4-mod/src/stuff.c
--- xwota-0.4/src/stuff.c 2006-07-28 19:00:10.000000000 +0300
+++ xwota-0.4-mod/src/stuff.c 2010-01-14 20:03:18.000000000 +0200
@@ -274,14 +274,15 @@
// UPPERCASE
gchar *uppercase(gchar *upper) {
-
-int upper_len,i;
+ int upper_len,i;
upper_len=strlen(upper);
+
+ g_return_val_if_fail(upper_len || !upper, NULL);
+
for(i=0;i<upper_len+1;i++) {
upper[i] = toupper(upper[i]);
}
-return upper;
-
+ return upper;
}
// Main statusbar
- Previous message: rpms/isomaster/devel isomaster-1.3.6-snprintf.patch, NONE, 1.1 isomaster-1.3.7-optflags.diff, NONE, 1.1 .cvsignore, 1.10, 1.11 isomaster.spec, 1.17, 1.18 sources, 1.10, 1.11
- Next message: rpms/pyxattr/F-11 pyxattr.spec,1.10,1.11 sources,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list