Fixed bit in cputest: do not read uninitialized memory.

This commit is contained in:
Allen 2018-06-13 15:17:40 +08:00
parent e3d8e8231f
commit 6bcbe286a6
1 changed files with 1 additions and 0 deletions

View File

@ -23,6 +23,7 @@ int main() {
uint8_t buf[2];
buf[0] = 0xaa;
buf[1] = 0x0;
nemu_assert(getbit(buf, 0) == 0);
nemu_assert(getbit(buf, 1) == 1);
nemu_assert(getbit(buf, 2) == 0);