19 lines
586 B
Diff
19 lines
586 B
Diff
diff --git a/src/iri.c b/src/iri.c
|
|
index 7dcf3ac..1c8695c 100644
|
|
--- a/src/iri.c
|
|
+++ b/src/iri.c
|
|
@@ -189,9 +189,10 @@ do_conversion (const char *tocode, const char *fromcode, char const *in_org, siz
|
|
{
|
|
tooshort++;
|
|
done = len;
|
|
- len = outlen = done + inlen * 2;
|
|
- s = xrealloc (s, outlen + 1);
|
|
- *out = s + done;
|
|
+ len = done + inlen * 2;
|
|
+ s = xrealloc (s, len + 1);
|
|
+ *out = s + done - outlen;
|
|
+ outlen += inlen * 2;
|
|
}
|
|
else /* Weird, we got an unspecified error */
|
|
{
|