forked from mia/Aegisub
Make the int/double option type detection slightly less broken
Choosing between int and double based on whether the default value is an int is dumb and broken enough, but with the "ceil" the detection didn't even work for negative numbers. Originally committed to SVN as r5937.
This commit is contained in:
parent
b993c02dee
commit
dfc68a4db9
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ void ConfigVisitor::Visit(const json::Array& array) {
|
|||
|
||||
|
||||
void ConfigVisitor::Visit(const json::Number& number) {
|
||||
if (int64_t(number) == ceil(number)) {
|
||||
if (int64_t(number) == number) {
|
||||
AddOptionValue(new OptionValueInt(name, int64_t(number)));
|
||||
} else {
|
||||
AddOptionValue(new OptionValueDouble(name, number));
|
||||
|
|
Loading…
Reference in a new issue