Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuklear",
"version": "4.12.7",
"version": "4.12.8",
"repo": "Immediate-Mode-UI/Nuklear",
"description": "A small ANSI C gui toolkit",
"keywords": ["gl", "ui", "toolkit"],
Expand Down
6 changes: 4 additions & 2 deletions nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -8383,7 +8383,7 @@ nk_utf_decode(const char *c, nk_rune *u, int clen)
*u = NK_UTF_INVALID;

udecoded = nk_utf_decode_byte(c[0], &len);
if (!NK_BETWEEN(len, 1, NK_UTF_SIZE))
if (!NK_BETWEEN(len, 1, NK_UTF_SIZE+1)) /* +1 because NK_BETWEEN uses strict upper bound ((a) <= (x) && (x) < (b)) */
return 1;

for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
Expand Down Expand Up @@ -20953,7 +20953,7 @@ nk_window_is_hovered(const struct nk_context *ctx)
return 0;
else {
struct nk_rect actual_bounds = ctx->current->bounds;
if (ctx->begin->flags & NK_WINDOW_MINIMIZED) {
if (ctx->current->flags & NK_WINDOW_MINIMIZED) {
actual_bounds.h = ctx->current->layout->header_height;
}
return nk_input_is_mouse_hovering_rect(&ctx->input, actual_bounds);
Expand Down Expand Up @@ -30716,6 +30716,8 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
/// - [y]: Minor version with non-breaking API and library changes
/// - [z]: Patch version with no direct changes to the API
///
/// - 2025/09/12 (4.12.8) - Fix nk_window_is_hovered to use current window flags
- Fix nk_utf_decode length check (allow len == NK_UTF_SIZE)
/// - 2025/04/06 (4.12.7) - Fix text input navigation and mouse scrolling
/// - 2025/03/29 (4.12.6) - Fix unitialized data in nk_input_char
/// - 2025/03/05 (4.12.5) - Fix scrolling knob also scrolling parent window, remove dead code
Expand Down
2 changes: 2 additions & 0 deletions src/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
/// - [y]: Minor version with non-breaking API and library changes
/// - [z]: Patch version with no direct changes to the API
///
/// - 2025/09/12 (4.12.8) - Fix nk_window_is_hovered to use current window flags
- Fix nk_utf_decode length check (allow len == NK_UTF_SIZE)
/// - 2025/04/06 (4.12.7) - Fix text input navigation and mouse scrolling
/// - 2025/03/29 (4.12.6) - Fix unitialized data in nk_input_char
/// - 2025/03/05 (4.12.5) - Fix scrolling knob also scrolling parent window, remove dead code
Expand Down
2 changes: 1 addition & 1 deletion src/nuklear_utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ nk_utf_decode(const char *c, nk_rune *u, int clen)
*u = NK_UTF_INVALID;

udecoded = nk_utf_decode_byte(c[0], &len);
if (!NK_BETWEEN(len, 1, NK_UTF_SIZE))
if (!NK_BETWEEN(len, 1, NK_UTF_SIZE+1)) /* +1 because NK_BETWEEN uses strict upper bound ((a) <= (x) && (x) < (b)) */
return 1;

for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
Expand Down
2 changes: 1 addition & 1 deletion src/nuklear_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ nk_window_is_hovered(const struct nk_context *ctx)
return 0;
else {
struct nk_rect actual_bounds = ctx->current->bounds;
if (ctx->begin->flags & NK_WINDOW_MINIMIZED) {
if (ctx->current->flags & NK_WINDOW_MINIMIZED) {
actual_bounds.h = ctx->current->layout->header_height;
}
return nk_input_is_mouse_hovering_rect(&ctx->input, actual_bounds);
Expand Down