projects
/
uzbl-mobile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f60b8c8
)
expand: append "" for a NULL string var
author
Brendan Taylor
<whateley@gmail.com>
Thu, 9 Jul 2009 03:45:07 +0000
(21:45 -0600)
committer
Brendan Taylor
<whateley@gmail.com>
Thu, 9 Jul 2009 03:45:07 +0000
(21:45 -0600)
uzbl.c
patch
|
blob
|
history
diff --git
a/uzbl.c
b/uzbl.c
index
2751cb6
..
6b01a32
100644
(file)
--- a/
uzbl.c
+++ b/
uzbl.c
@@
-290,7
+290,7
@@
expand(char *s, guint recurse, gboolean escape_markup) {
if(etype == EXP_SIMPLE_VAR ||
etype == EXP_BRACED_VAR) {
if( (c = g_hash_table_lookup(uzbl.comm.proto_var, ret)) ) {
if(etype == EXP_SIMPLE_VAR ||
etype == EXP_BRACED_VAR) {
if( (c = g_hash_table_lookup(uzbl.comm.proto_var, ret)) ) {
- if(c->type == TYPE_STR) {
+ if(c->type == TYPE_STR && *c->ptr != NULL) {
if(escape_markup) {
char *b = g_markup_escape_text((gchar *)*c->ptr,
strlen((gchar *)*c->ptr));
if(escape_markup) {
char *b = g_markup_escape_text((gchar *)*c->ptr,
strlen((gchar *)*c->ptr));
@@
-299,7
+299,7
@@
expand(char *s, guint recurse, gboolean escape_markup) {
} else {
g_string_append(buf, (gchar *)*c->ptr);
}
} else {
g_string_append(buf, (gchar *)*c->ptr);
}
- } else if(c && c->type == TYPE_INT) {
+ } else if(c->type == TYPE_INT) {
char *b = itos((uintptr_t)*c->ptr);
g_string_append(buf, b);
g_free(b);
char *b = itos((uintptr_t)*c->ptr);
g_string_append(buf, b);
g_free(b);