Skip to content

Suggest using bool type instead of int in function mjson_get_bool() #69

Description

@hyansuper

because sizeof(bool) is not the same as sizeof(int), If someone put a bool var as the last param into funciton int mjson_get_bool(const char *s, int len, const char *path, int *v), adjacent memory with bool var may be overwritten.

So I suggest change the function to signature to int mjson_get_bool(const char *s, int len, const char *path, bool* b) since the name says "get bool"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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