Fixing renderbase buffer overflow in sprintf