changeset 2261:86dfcf3f418a

Fix crash at very low resolutions
author Michael Pavone <pavone@retrodev.com>
date Fri, 23 Dec 2022 05:49:04 -0800
parents 3f155bc13183
children bc68560b4a04
files nuklear_ui/nuklear.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/nuklear_ui/nuklear.h	Sun Dec 18 23:32:33 2022 -0800
+++ b/nuklear_ui/nuklear.h	Fri Dec 23 05:49:04 2022 -0800
@@ -11387,7 +11387,7 @@
     *height = 0;
 	int width_estimate = sqrt(pixel_area_estimate) + 0.5;
 	*width = 128;
-	while (*width < width_estimate)
+	while (*width < width_estimate || *width < custom->w * 2)
 	{
 		*width *= 2;
 	}