-
Notifications
You must be signed in to change notification settings - Fork 41
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
Floats are displayed incorrectly #32
Comments
Received. Please provide the original plist file, and I will analyze it on my side. |
You are opening a binary file, which seems to be a problem regarding accuracy when converting data. |
Also, may I ask if your MacOS version is 12.4 (21F79)? |
Thanks. Yes, I updated yesterday to 12.4 21F79 |
If this value is used to define the version number, then why didn't the original file just set this value to 4.3, but 4.29999...? |
Hmm that is actually strange. All of the normal tools I have to deal with binary plists (defaults, plutil, plistbuddy, python plistlib...) report the value as "4.3". How did you even see the raw value? |
select this file and hit the spacebar |
macOS, the spacebar is enough to preview the file. I am also currently using macOS 12.4 (21F79) |
Hmm. I see what you mean. However, even Xcode renders this value as I made a small Python script to dump the contents, and also I see $ plist-parse.py ~/Library/Preferences/com.aptonic.Dropzone-setapp.plist CurrentAppVersion
4.3 I don't know what the correct answer is here, but so far the only tool that outputs as a |
It has been updated, please upgrade to the latest version. |
Thank you. But I am skeptical of this code. I looked at how the fix was implemented. It makes me nervous that data is going to be changed or inaccurately represented. I was able to reproduce the strange rounding with the following command:
So it seems your program may not be alone after all in how it displays this data. I will keep investigating. But for now I suggest maybe rolling back this fix. update: it is not exactly the same, but feels like this could be closely related to this bug: https://www.cocoanetics.com/2012/09/radar-cgrectmakewithdictionaryrepresentation/ In the end this is probably something I should ask the developer of that app about- it's probably best to store the version as a String value, and use an Int to store the build number. So it won't be subjected to rounding errors like this. |
It doesn't matter, Xplist must perform this rounding operation in order to be consistent with Xcode's parsing. |
Okay. |
In fact, I always thought Xplist's parsing was the most correct because it shows the original values of the data without ever doing any rounding on the original values of the data. |
It is now rolled back, please feel free to let me know if you have any questions or ideas, thanks. |
Floats are not displayed properly. See below
Also should the type be shown as
float
instead ofreal
?The text was updated successfully, but these errors were encountered: