Skip to content

Commit e1b287d

Browse files
committed
manual application of fix for github.com/ocornut/imgui/issues/5343
removed discontinued notice from README
1 parent 6bc27bb commit e1b287d

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@
44
[![Go Report Card](https://goreportcard.com/badge/github.com/inkyblackness/imgui-go)](https://goreportcard.com/report/github.com/inkyblackness/imgui-go)
55
[![Lint Status](https://github.com/inkyblackness/imgui-go/workflows/golangci-lint/badge.svg)](https://github.com/inkyblackness/imgui-go/actions)
66

7-
## Discontinued
8-
**This repository is no longer maintained as per 2022-12-31.
9-
Please consider using https://github.com/AllenDang/cimgui-go instead.
10-
That project is an auto-generated wrapper and makes it easier to be at the latest version of *Dear ImGui*.**
11-
12-
**You may also have a look at this fork https://github.com/eliasdaler/imgui-go , the owner intended to
13-
continue to support it.**
14-
15-
---
16-
177
This library is a [Go](https://www.golang.org) wrapper for **[Dear ImGui](https://github.com/ocornut/imgui)**.
188

199
This wrapper started as a special-purpose wrapper for use within InkyBlackness.

imgui/imgui_draw.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2618,9 +2618,16 @@ void ImFontAtlasBuildPackCustomRects(ImFontAtlas* atlas, void* stbrp_context_opa
26182618
ImVector<ImFontAtlasCustomRect>& user_rects = atlas->CustomRects;
26192619
IM_ASSERT(user_rects.Size >= 1); // We expect at least the default custom rects to be registered, else something went wrong.
26202620

2621+
// https://github.com/ocornut/imgui/issues/5343
2622+
#ifdef __GNUC__
2623+
if (user_rects.Size < 1) {
2624+
__builtin_unreachable();
2625+
}
2626+
#endif
2627+
26212628
ImVector<stbrp_rect> pack_rects;
26222629
pack_rects.resize(user_rects.Size);
2623-
memset(pack_rects.Data, 0, (size_t)pack_rects.size_in_bytes());
2630+
memset(pack_rects.Data, 0, pack_rects.size_in_bytes());
26242631
for (int i = 0; i < user_rects.Size; i++)
26252632
{
26262633
pack_rects[i].w = user_rects[i].Width;

0 commit comments

Comments
 (0)