diff --git a/support/src/FontWriter/src/font_writer.cpp b/support/src/FontWriter/src/font_writer.cpp index f9be16e3..c8eaeadd 100644 --- a/support/src/FontWriter/src/font_writer.cpp +++ b/support/src/FontWriter/src/font_writer.cpp @@ -7,10 +7,17 @@ namespace JabyEngine { static constexpr auto ITOABufferSize = 32; + // Can we not find a better version of this? static char* simple_itoa(char (&buffer)[ITOABufferSize], bool is_neg, uint32_t value, uint32_t base) { // v terminating 0 and space for sign int i = ITOABufferSize - 2; + if(value == 0) { + buffer[0] = '0'; + buffer[1] = '\0'; + return buffer; + } + for(; value && i; i--, value /= base) { char chr = '0' + value%base; if(chr > '9') {