More length fiddling.

This commit is contained in:
Russ Cox 2007-01-29 01:43:06 +00:00
parent 7bdaff72af
commit a984a8b22b
1 changed files with 1 additions and 1 deletions

View File

@ -628,7 +628,7 @@ clipread(void)
}
CFIndex length = CFDataGetLength(cfdata)/sizeof(Rune);
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);
char *s = snarf;
while (*s) {