From 12a237a692a81328f3f14927af016b53de12eabd Mon Sep 17 00:00:00 2001 From: markm Date: Tue, 25 Jul 2000 21:18:47 +0000 Subject: o Fix a horrible bug where small reads (< 8 bytes) would return the wrong bytes. o Improve the public interface; use void* instead of char* or u_int64_t to pass arbitrary data around. Submitted by: kris ("horrible bug") --- sys/dev/syscons/syscons.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys/dev/syscons/syscons.c') diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index cbcace8..2a447f7 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -2956,9 +2956,8 @@ next_code: if (!(c & RELKEY)) sc_touch_scrn_saver(); - /* do the /dev/random device a favour */ if (!(flags & SCGETC_CN)) - random_harvest((u_int64_t)c, 1, 0, RANDOM_KEYBOARD); + random_harvest(&c, sizeof(c), 1, 0, RANDOM_KEYBOARD); if (scp->kbd_mode != K_XLATE) return KEYCHAR(c); -- cgit v1.1