diff --git a/gs.h b/gs.h index 1619ea1..96ea464 100644 --- a/gs.h +++ b/gs.h @@ -7925,7 +7925,7 @@ gs_asset_texture_load_from_file(const char* path, void* out, gs_graphics_texture stbi_set_flip_vertically_on_load(t->desc.flip_y); *t->desc.data = (uint8_t*)stbi_load_from_file(f, (int32_t*)&t->desc.width, (int32_t*)&t->desc.height, (int32_t*)&comp, STBI_rgb_alpha); - if (!t->desc.data) { + if (!*t->desc.data) { fclose(f); return false; } @@ -7972,7 +7972,7 @@ bool gs_asset_texture_load_from_memory(const void* memory, size_t sz, void* out, // Load texture data int32_t num_comps = 0; bool32_t loaded = gs_util_load_texture_data_from_memory(memory, sz, (int32_t*)&t->desc.width, - (int32_t*)&t->desc.height, (uint32_t*)&num_comps, (void**)&t->desc.data, t->desc.flip_y); + (int32_t*)&t->desc.height, (uint32_t*)&num_comps, t->desc.data, t->desc.flip_y); if (!loaded) { return false; @@ -7981,7 +7981,7 @@ bool gs_asset_texture_load_from_memory(const void* memory, size_t sz, void* out, t->hndl = gs_graphics_texture_create(&t->desc); if (!keep_data) { - gs_free(t->desc.data); + gs_free(*t->desc.data); *t->desc.data = NULL; } @@ -8721,7 +8721,7 @@ gs_lexer_c_next_token(gs_lexer_t* lex) ) { // Grab decimal - num_decimals = lex->at[0] == '.' ? num_decimals++ : num_decimals; + num_decimals = lex->at[0] == '.' ? num_decimals + 1 : num_decimals; //Increment lex->at++; @@ -8818,7 +8818,7 @@ gs_lexer_c_next_token(gs_lexer_t* lex) ) { // Grab decimal - num_decimals = lex->at[0] == '.' ? num_decimals++ : num_decimals; + num_decimals = lex->at[0] == '.' ? num_decimals + 1 : num_decimals; //Increment lex->at++; diff --git a/util/gs_gui.h b/util/gs_gui.h index 5dcae9e..66ac4c6 100644 --- a/util/gs_gui.h +++ b/util/gs_gui.h @@ -5478,7 +5478,7 @@ gs_gui_draw_text(gs_gui_context_t* ctx, gs_asset_font_t* font, const char *str, } while (0) // Draw shadow - if (shadow_x || shadow_y && shadow_color.a) + if ((shadow_x || shadow_y) && shadow_color.a) { DRAW_TEXT(str, gs_gui_rect(pos.x + (float)shadow_x, pos.y + (float)shadow_y, td.x, td.y), shadow_color); } @@ -7246,8 +7246,8 @@ gs_gui_window_begin_ex(gs_gui_context_t * ctx, const char* title, gs_gui_rect_t if (tab_bar->focus == tab_item->idx) { cnt->flags |= GS_GUI_WINDOW_FLAGS_VISIBLE; - cnt->opt &= !GS_GUI_OPT_NOINTERACT; - cnt->opt &= !GS_GUI_OPT_NOHOVER; + cnt->opt &= ~GS_GUI_OPT_NOINTERACT; + cnt->opt &= ~GS_GUI_OPT_NOHOVER; } else {