Commit 343da446 authored by phcoder's avatar phcoder
Browse files

Fix wrong range check

parent 321f9bd2
......@@ -209,7 +209,7 @@ namespace retro8
public:
Font() { }
inline const sequential_sprite_t* glyph(char c) const { return c < 128 ? &glyphs[c] : nullptr; }
inline const sequential_sprite_t* glyph(char c) const { return (unsigned) c < 128 ? &glyphs[(unsigned) c] : nullptr; }
inline const sequential_sprite_t* specialGlyph(size_t i) const { return &glyphs[128+i]; }
void load();
......@@ -221,4 +221,4 @@ namespace retro8
};
}
\ No newline at end of file
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment