mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-10 19:44:43 +03:00
[project @ 2006-02-11 18:11:09 by jmb]
Clear cached conversion descriptor if iconv() fails svn path=/import/netsurf/; revision=2071
This commit is contained in:
parent
6b3b19a95b
commit
6b6841f07e
@ -320,6 +320,10 @@ utf8_convert_ret utf8_convert(const char *string, size_t len,
|
||||
/* perform conversion */
|
||||
if (iconv(cd, &in, &slen, &out, &rlen) == (size_t)-1) {
|
||||
free(temp);
|
||||
/* clear the cached conversion descriptor as it's invalid */
|
||||
last_cd.from[0] = '\0';
|
||||
last_cd.to[0] = '\0';
|
||||
last_cd.cd = 0;
|
||||
/** \todo handle the various cases properly
|
||||
* There are 3 possible error cases:
|
||||
* a) Insufficiently large output buffer
|
||||
|
Loading…
x
Reference in New Issue
Block a user