projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
uint64_decimal() incorrectly output 0 as "" instead of "0". This only affected
[u/mdw/putty]
/
ldiscucs.c
diff --git
a/ldiscucs.c
b/ldiscucs.c
index
2e19adc
..
4ac28d7
100644
(file)
--- a/
ldiscucs.c
+++ b/
ldiscucs.c
@@
-26,7
+26,7
@@
void lpage_send(void *handle,
}
widesize = len * 2;
}
widesize = len * 2;
- widebuffer = s
malloc(widesize * sizeof(wchar_t)
);
+ widebuffer = s
newn(widesize, wchar_t
);
wclen = mb_to_wc(codepage, 0, buf, len, widebuffer, widesize);
luni_send(ldisc, widebuffer, wclen, interactive);
wclen = mb_to_wc(codepage, 0, buf, len, widebuffer, widesize);
luni_send(ldisc, widebuffer, wclen, interactive);
@@
-44,7
+44,7
@@
void luni_send(void *handle, wchar_t * widebuf, int len, int interactive)
char *p;
linesize = len * ratio * 2;
char *p;
linesize = len * ratio * 2;
- linebuffer = s
malloc(linesize * sizeof(wchar_t)
);
+ linebuffer = s
newn(linesize, char
);
if (in_utf(ldisc->term)) {
/* UTF is a simple algorithm */
if (in_utf(ldisc->term)) {
/* UTF is a simple algorithm */
@@
-66,8
+66,8
@@
void luni_send(void *handle, wchar_t * widebuf, int len, int interactive)
}
} else {
int rv;
}
} else {
int rv;
- rv = wc_to_mb(line_codepage, 0, widebuf, len,
- linebuffer, linesize, NULL, NULL);
+ rv = wc_to_mb(l
disc->term->ucsdata->l
ine_codepage, 0, widebuf, len,
+ linebuffer, linesize, NULL, NULL
, ldisc->term->ucsdata
);
if (rv >= 0)
p = linebuffer + rv;
else
if (rv >= 0)
p = linebuffer + rv;
else