-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrectly parsed value of gid with horizontal flip flag on #84
base: master
Are you sure you want to change the base?
Conversation
Hi, thank you for this, What is the issue? I can't infer what it is from the contributed code. Thanks! |
Gids in TMX files are unsigned int numbers, but |
Thanks again, would using function |
I decided on
And also made content.gid unsigned, to be consistent with tmx format which stores gids as unsigned (e.g. gid 1 with h-flip is 2,147,483,649 instead of -2,147,483,647). It shouldn't break anything unless a user is silly and checks for h-flip with |
Thanks for doing the change. I don't understand why could you please detail your reasoning here? |
unsigned long gid = strtoul(value, NULL, 0);
if (gid > UINT_MAX || gid == ULONG_MAX && errno == ERANGE)
// Some systems have int and long as the same size.
// In that case you can't tell out-of-range from the value alone, and need to check errno. vs unsigned long long gid = strtoull(value, NULL, 0);
if (gid > UINT_MAX) |
No description provided.