summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
Diffstat (limited to 'pith')
-rw-r--r--pith/pine.hlp2
-rw-r--r--pith/string.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/pith/pine.hlp b/pith/pine.hlp
index d737ed43..da5e7dea 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 30 2013-09-12 00:34:18
+Alpine Commit 31 2013-09-15 20:38:27
============= h_news =================
<HTML>
<HEAD>
diff --git a/pith/string.c b/pith/string.c
index 7951ab39..9bd91d6a 100644
--- a/pith/string.c
+++ b/pith/string.c
@@ -752,11 +752,11 @@ void
convert_string_to_utf8(char *buf, int bufsize)
{
char *s;
- if(strucmp("UTF-8", ps_global->display_charmap)){
- s = convert_to_utf8(buf, ps_global->display_charmap, 0);
- strncpy(buf, s ? s : "", bufsize);
- buf[sizeof(buf)-1] = '\0';
- if(s) fs_give((void **)&s);
+ if(strucmp("UTF-8", ps_global->display_charmap) &&
+ (s = convert_to_utf8(buf, ps_global->display_charmap, 0)) != NULL){
+ strncpy(buf, s, bufsize);
+ buf[bufsize-1] = '\0';
+ fs_give((void **)&s);
}
}