mirror of https://github.com/vitalif/openscad
Fix for dates being interpreted as octal numbers
parent
0b036e0e20
commit
bd8fb851f5
|
@ -351,10 +351,10 @@ Value builtin_version(const Context *, const std::vector<std::string>&, const st
|
|||
{
|
||||
Value val;
|
||||
val.type = Value::VECTOR;
|
||||
val.append(new Value(double(OPENSCAD_YEAR)));
|
||||
val.append(new Value(double(OPENSCAD_MONTH)));
|
||||
val.append(new Value(OPENSCAD_YEAR));
|
||||
val.append(new Value(OPENSCAD_MONTH));
|
||||
#ifdef OPENSCAD_DAY
|
||||
val.append(new Value(double(OPENSCAD_DAY)));
|
||||
val.append(new Value(OPENSCAD_DAY));
|
||||
#endif
|
||||
return val;
|
||||
}
|
||||
|
|
|
@ -56,4 +56,9 @@ isEmpty(VERSION) {
|
|||
VERSION_MONTH=$$member(VERSION_SPLIT, 1)
|
||||
VERSION_DAY=$$member(VERSION_SPLIT, 2)
|
||||
}
|
||||
# Fix for problem with integers with leading zeros
|
||||
# being interpreted by C++ as octals. Now they're doubles.
|
||||
VERSION_YEAR=$${VERSION_YEAR}.0
|
||||
VERSION_MONTH=$${VERSION_MONTH}.0
|
||||
VERSION_DAY=$${VERSION_DAY}.0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue