Perform bounds checks on drawing.

This commit is contained in:
Steven Smith 2015-01-20 20:58:56 -08:00
parent 8aaf828168
commit da893064a0

View File

@ -308,7 +308,7 @@ int screen_get_index(int x, int y) {
}
void screen_draw(int x, int y, u8 r, u8 g, u8 b) {
if(fb == NULL) {
if(fb == NULL || x < 0 || y < 0 || x >= screen_get_width() || y >= screen_get_height()) {
return;
}