use assert to check for incorrect use of BLF_draw_ascii()
authorCampbell Barton <ideasman42@gmail.com>
Fri, 8 Nov 2013 15:01:43 +0000 (15:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 8 Nov 2013 15:01:43 +0000 (15:01 +0000)
source/blender/blenfont/intern/blf_font.c

index d46df82929564446c232bc98fde59f947988d457..998b415a6af36da1e2ca7c3a46cc8104c5f5183c 100644 (file)
@@ -210,6 +210,7 @@ void blf_font_draw_ascii(FontBLF *font, const char *str, size_t len)
        blf_font_ensure_ascii_table(font);
 
        while ((c = *(str++)) && len--) {
+               BLI_assert(c < 128);
                if ((g = glyph_ascii_table[c]) == NULL)
                        continue;
                if (has_kerning)