- [FIX] sys.subpal() now clamps values for safety

This commit is contained in:
2026-02-25 11:53:15 +01:00
parent a17a1bb517
commit 5db06a0645
2 changed files with 3 additions and 2 deletions

View File

@@ -726,7 +726,7 @@ uint8_t gettrans() {
}
void subpal(uint8_t index, uint8_t color) {
ds::draw_palette[index] = color;
ds::draw_palette[SDL_clamp(index,0,255)] = SDL_clamp(color,0,255);
}
void reset_subpal() {