summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2013-09-15 20:38:32 -0600
committerEduardo Chappa <chappa@washington.edu>2013-09-15 20:38:32 -0600
commit48e1f5018f9d324c1ebce3ea627db50fe03a2134 (patch)
tree163db8aedac51e6aeb231fcb8ab5a0d124b265a2 /pith
parent1de2a1f9a4cc3b9496e836f9487c721526b4add1 (diff)
downloadalpine-48e1f5018f9d324c1ebce3ea627db50fe03a2134.tar.xz
* I had copied some code incorrectly in the fix for the issue about
transformation of dates in locales to utf-8, this made the fix worse than then problem. Now it got fixed. This was reported by Werner Scheinast.
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);
}
}