aboutsummaryrefslogtreecommitdiff
path: root/src/mgui/button.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mgui/button.c')
-rw-r--r--src/mgui/button.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mgui/button.c b/src/mgui/button.c
index 00db361..d77750d 100644
--- a/src/mgui/button.c
+++ b/src/mgui/button.c
@@ -12,6 +12,10 @@ static int min_int(int a, int b) {
}
mgui_button* mgui_button_create(const char *str, size_t size, unsigned char character_size) {
+ /* TODO: Make this work for character size >= 100 */
+ if(character_size >= 100)
+ character_size = 99;
+
mgui_button *button = mgui_alloc(sizeof(mgui_button));
mgui_widget_init(&button->widget, MGUI_WIDGET_BUTTON);
button->background.position = (mgl_vec2f){ 0.0f, 0.0f };