Skip to content
Snippets Groups Projects
Commit 02530a48 authored by Nathaniel Wesley Filardo's avatar Nathaniel Wesley Filardo Committed by Frans Kaashoek
Browse files

Add sanity check panic for CRTC interactions

parent b019ac4f
Branches
No related tags found
No related merge requests found
......@@ -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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment