gawk/gawk-3.1.5-wconcat.patch

17 lines
495 B
Diff
Raw Normal View History

2006-02-14 08:47:27 +00:00
--- gawk-3.1.5/eval.c.wconcat 2006-02-14 09:40:54.000000000 +0100
+++ gawk-3.1.5/eval.c 2006-02-14 09:43:33.000000000 +0100
@@ -1176,6 +1176,13 @@
2006-02-10 22:01:46 +00:00
memcpy(l->stptr + l->stlen, r->stptr, r->stlen);
l->stlen += r->stlen;
l->stptr[l->stlen] = '\0';
2006-02-14 08:47:27 +00:00
+#if defined MBS_SUPPORT
+ if (r->wstptr != NULL)
+ free(r->wstptr);
+ r->wstptr = NULL;
+ r->wstlen = 0;
+ r->flags &= ~WSTRCUR;
+#endif /* MBS_SUPPORT */
2006-02-10 22:01:46 +00:00
} else {
char *nval;
size_t nlen = l->stlen + r->stlen + 2;