Closed osyrisrblx closed 10 months ago
I used the playground to test this.
My config is
{ rules: [ { rule: 'inject_global_value', identifier: '__DEV__', value: 1E10, }, ], }
My input Lua code is
print(__DEV__)
This creates an expected output of
print(1E10)
However, at higher values there's some weird behavior:
1E19
1E20
1E29
9999999999999996E13
1E34
10000E30
1E39
9999999999999996E23
1E42
10000000E35
1E49
1000E46
1E309
nil
I'm sure there are more but I gave up.
Personally, I think the expected result would be that darklua would error if an input is unreasonably large.
I used the playground to test this.
My config is
My input Lua code is
This creates an expected output of
However, at higher values there's some weird behavior:
1E19
and1E20
will both cause a darklua error: "error parsing integer" (this would be fine if all values after this also errored)1E29
gives an emit of9999999999999996E13
1E34
gives an emit of10000E30
1E39
gives an emit of9999999999999996E23
1E42
gives an emit of10000000E35
1E49
gives an emit of1000E46
1E309
and higher give an emit ofnil
.. but should probably just be an errorI'm sure there are more but I gave up.
Personally, I think the expected result would be that darklua would error if an input is unreasonably large.