mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-04-06 03:58:02 +08:00
Perform bounds checks on drawing.
This commit is contained in:
parent
8aaf828168
commit
da893064a0
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user