mirror of https://github.com/0intro/conterm
More length fiddling.
This commit is contained in:
parent
7bdaff72af
commit
a984a8b22b
|
@ -628,7 +628,7 @@ clipread(void)
|
||||||
}
|
}
|
||||||
CFIndex length = CFDataGetLength(cfdata)/sizeof(Rune);
|
CFIndex length = CFDataGetLength(cfdata)/sizeof(Rune);
|
||||||
if (length > sizeof rsnarf) length = sizeof rsnarf;
|
if (length > sizeof rsnarf) length = sizeof rsnarf;
|
||||||
CFDataGetBytes(cfdata, CFRangeMake(0, length), (uint8_t *)rsnarf);
|
CFDataGetBytes(cfdata, CFRangeMake(0, length*sizeof(Rune)), (uint8_t *)rsnarf);
|
||||||
snprint(snarf, sizeof snarf, "%.*S", length, rsnarf);
|
snprint(snarf, sizeof snarf, "%.*S", length, rsnarf);
|
||||||
char *s = snarf;
|
char *s = snarf;
|
||||||
while (*s) {
|
while (*s) {
|
||||||
|
|
Loading…
Reference in New Issue