summaryrefslogtreecommitdiff
path: root/pico/osdep
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-01-25 18:52:13 -0700
committerEduardo Chappa <chappa@washington.edu>2015-01-25 18:52:13 -0700
commit4db5ba9a511564e4a3cb3d2b67bce4bb171eae4f (patch)
tree8ff91f6581acb023e7a3d989414cc925927b49b3 /pico/osdep
parent2ea73d14866f5eb39bc6a9aab36312abd6fa525c (diff)
downloadalpine-4db5ba9a511564e4a3cb3d2b67bce4bb171eae4f.tar.xz
* new version 2.20.1
* Ignore message from smtp server after a successful authentication challenge. * Alpine would not set include and lib paths for OpenSSL if this was installed in /usr/local/ssl. * If the .pinerc file is a symbolic link, Alpine might not write its contents when saving its configuration. * The _INIT_ token does not skip over non-alpha numeric characters in the name. Reported by Andreas Fehr. * If SSLDIR is defined somehow, do not disable S/MIME if the SSLCERTSDIR is not found. * Mismatch in size of UCS and CELL caused a corruption in the content of a pointer, which made the speller in PC-Alpine get the content of a word incorrectly. * Update splash screen to version 2.20 in main repository. * Skip testing openssl compatibility version when cross-compilation is detected. Fix contributed by Antti Seppälä.
Diffstat (limited to 'pico/osdep')
-rw-r--r--pico/osdep/mswin_spell.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/pico/osdep/mswin_spell.c b/pico/osdep/mswin_spell.c
index e921cfcd..ac899421 100644
--- a/pico/osdep/mswin_spell.c
+++ b/pico/osdep/mswin_spell.c
@@ -437,6 +437,9 @@ spell_dlg_proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
static int
get_next_word(WORD_INFO *word_info)
{
+ UCS *ucst;
+ int i, hibit;
+
// Skip quoted lines
while(lgetc(curwp->w_dotp, 0).c == '>')
{
@@ -479,9 +482,19 @@ get_next_word(WORD_INFO *word_info)
break;
}
- word_info->word_utf8 = ucs4_to_utf8_cpystr_n(
- (UCS *)&word_info->word_dotp->l_text[word_info->word_doto],
- word_info->word_size);
+ ucst = (UCS *)&word_info->word_dotp->l_text[word_info->word_doto];
+ for(i = 0, hibit = 0; i < word_info->word_size; i++)
+ if(ucst[i] & 0xff000000)
+ hibit++;
+
+ if(hibit > 0){
+ ucst = ucs4_cpystr(ucst);
+ for(i = 0; i < word_info->word_size; i++)
+ ucst[i] &= 0xffffff;
+ }
+ word_info->word_utf8 = ucs4_to_utf8_cpystr_n(ucst, word_info->word_size);
+ if(hibit > 0)
+ fs_give((void **)&ucst);
return 1;
}