[Demo] draw_char() ignores unprintable characters
@@ -29,6 +29,10 @@ static inline bool bitset_check(uint32_t* bitset, int idx) {
}
void draw_char(ca_layer* layer, char ch, int x, int y, Color color, Size font_size) {
+ if (!isprint(ch) || !isascii(ch)) {
+ return;
+ }
+
Point p = point_make(x, y);
//if (p.x < 0 || p.y < 0 || p.x >= layer->size.width || p.y >= layer->size.height) return;
