1.19.50 still be affected, but requires raise "min_engine_version" to "1.19.50"
I had uploaded the modified mcpack
In windows platform (windows, bds-win), every number (eg. 2, 28, NaN, Infinity) equals to `NaN`.
In unix-like platform (android, bds-linux), every number not equals to `NaN`.
The expecting result is `NaN` not equals to any number, includes `NaN`.
Steps to Reproduce:
To rapidly reduce this bug, please open 'Content log GUI' to view content log.
1.create a behaviour pack use this manifest.json:
{
"format_version": 2,
"header": {
"name": "test",
"description": "NaN equals to every number",
"uuid": "67bba722-9705-11ed-bee4-1b6256aa0773",
"version": [0, 1, 0],
"min_engine_version": [1, 19, 50]
},
"modules": [
{
"description": "scripts",
"type": "script",
"language": "javascript",
"uuid": "67bba574-9705-11ed-bee2-875d06de3443",
"version": [0, 1, 0],
"entry": "scripts/index.js"
}
]
}
2.write a simple code in 'scripts/index.js'
console.warn(String(NaN == 1));
3.create a new world, enable 'Scirpts API' feature, then enable this behaviour pack.
4.enter this world.
Observed Results:
you will see a message like this.
[Scripting][warning]-true
It shows us that `NaN` equals to `1`.
Expected Results:
expectant result is `NaN` not equals to `1`. so the message should be:
[Scripting][warning]-false
fixed on 1.19.80