Skip to content

nk_do_property() uses nk_strtod() instead of NK_STRTOD() #851

@sleeptightAnsiC

Description

@sleeptightAnsiC

You can provide your own definition of NK_STRTOD(), but nk_do_property() will ignore this and still use internal nk_strtod() instead of user-provided macro:

Nuklear/src/nuklear.h

Lines 3818 to 3821 in fcd64f8

#ifndef NK_STRTOD
#define NK_STRTOD nk_strtod
NK_API double nk_strtod(const char *str, char **endptr);
#endif

case NK_PROPERTY_DOUBLE:
nk_string_float_limit(buffer, NK_MAX_FLOAT_PRECISION);
variant->value.d = nk_strtod(buffer, 0);
variant->value.d = NK_CLAMP(variant->min_value.d, variant->value.d, variant->max_value.d);
break;

Should be an easy fix, unless there are more issues like this one, or if there is some hidden dependency issue that I missed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions