diff options
author | Erich Eckner <git@eckner.net> | 2018-10-24 13:32:42 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-10-24 13:32:42 +0200 |
commit | c91db0902c99c783c9652458a3b460f15ae8f18e (patch) | |
tree | 5447d3721836b6ffc8ecb14999227b227d03a2da /fonts.c | |
parent | d37c32d97c01b3573e1f1044872dfc10b75a53ae (diff) | |
download | anzeige-c91db0902c99c783c9652458a3b460f15ae8f18e.tar.xz |
fonts.c: render() should abort at "\0"
Diffstat (limited to 'fonts.c')
-rw-r--r-- | fonts.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6,7 +6,7 @@ int render(unsigned char *input, int input_len, unsigned char *output, int max_o { memset(output, 0, max_output_len); int output_i = 0; - for (int input_i=0; (input_i < input_len) && (output_i*(SYMBOL_WIDTH+1) < max_output_len); input_i++) { + for (int input_i=0; (input_i < input_len) && (output_i*(SYMBOL_WIDTH+1) < max_output_len) && input[input_i]; input_i++) { unsigned char c = input[input_i]; if (c >= 0x7f) { if (c <= 0xaf) { |