1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 00:35:26 +03:00

small tweak to avoid treating a newline at the end a font file as data

This commit is contained in:
root 2019-04-04 03:54:11 +00:00
parent a36329c860
commit d58b721ab9

View file

@ -114,10 +114,11 @@ FONT.parseMCMFontFile = function (data) {
// hexstring is for debugging
FONT.data.hexstring = [];
var pushChar = function () {
// Only push full characters onto the stack.
if (character_bytes.length != 64) { return; }
FONT.data.characters_bytes.push(character_bytes);
FONT.data.characters.push(character_bits);
FONT.draw(FONT.data.characters.length - 1);
//$log.debug('parsed char ', i, ' as ', character);
character_bits = [];
character_bytes = [];
};