Skip to content

Commit 8513b63

Browse files
committed
really fixed memory issue, bumped version, remove tabs
1 parent ae6deb7 commit 8513b63

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

nuklear.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16343,7 +16343,7 @@ nk_font_baker_memory(nk_size *temp, int *glyph_count,
1634316343
} while ((i = i->n) != iter);
1634416344
}
1634516345
*temp = (nk_size)*glyph_count * sizeof(struct stbrp_rect);
16346-
*temp += (nk_size)*glyph_count * sizeof(stbtt_pack_range);
16346+
*temp += (nk_size)total_range_count * sizeof(stbtt_pack_range);
1634716347
*temp += (nk_size)*glyph_count * sizeof(stbtt_packedchar);
1634816348
*temp += (nk_size)count * sizeof(struct nk_font_bake_data);
1634916349
*temp += sizeof(struct nk_font_baker);
@@ -17384,6 +17384,7 @@ nk_font_atlas_bake(struct nk_font_atlas *atlas, int *width, int *height,
1738417384
tmp = atlas->temporary.alloc(atlas->temporary.userdata,0, tmp_size);
1738517385
NK_ASSERT(tmp);
1738617386
if (!tmp) goto failed;
17387+
memset(tmp,0,tmp_size);
1738717388

1738817389
/* allocate glyph memory for all fonts */
1738917390
baker = nk_font_baker(tmp, atlas->glyph_count, atlas->font_num, &atlas->temporary);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nuklear",
3-
"version": "4.01.5",
3+
"version": "4.01.6",
44
"repo": "Immediate-Mode-UI/Nuklear",
55
"description": "A small ANSI C gui toolkit",
66
"keywords": ["gl", "ui", "toolkit"],

0 commit comments

Comments
 (0)