提交 02530a48 创建 作者: Nathaniel Wesley Filardo's avatar Nathaniel Wesley Filardo 提交者: Frans Kaashoek

Add sanity check panic for CRTC interactions

上级 b019ac4f
......@@ -144,6 +144,9 @@ cgaputc(int c)
} else
crt[pos++] = (c&0xff) | 0x0700; // black on white
if(pos > 25*80)
panic("pos overflow");
if((pos/80) >= 24){ // Scroll up.
memmove(crt, crt+80, sizeof(crt[0])*23*80);
pos -= 80;
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论