Skip to content

gx_prompt_text_color_set macro incorrectly casts to GX_PROGRESS_BAR * instead of GX_PROMPT * when GUIX_5_4_0_COMPATIBILITY is defined #160

Description

@s-w-k-r

File
common/inc/gx_api.h

#if defined(GUIX_5_4_0_COMPATIBILITY)
#define gx_prompt_text_color_set(a, b, c)                        _gx_prompt_text_color_set((GX_PROGRESS_BAR *)a, b, c, b)
#else
#define gx_prompt_text_color_set                                 _gx_prompt_text_color_set
#endif

Description
When GUIX_5_4_0_COMPATIBILITY is defined, the macro gx_prompt_text_color_set incorrectly casts the first argument to GX_PROGRESS_BAR * instead of GX_PROMPT *. This is a copy-paste error, likely copied from the gx_progress_bar_text_color_set macro definition directly above it.

This causes a type mismatch and can lead to undefined behavior or compiler warnings when calling gx_prompt_text_color_set on a GX_PROMPT widget in compatibility mode.

Steps to Reproduce
Define GUIX_5_4_0_COMPATIBILITY in your project
Call gx_prompt_text_color_set with a GX_PROMPT * pointer

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions