sciter-sdk / go-sciter

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
https://sciter.com
2.57k stars 268 forks source link

Fix sciter.NullValue() #334

Closed MarkusBauer closed 2 years ago

MarkusBauer commented 2 years ago

The function sciter.NullValue() currently creates undefined instead of null, because it sets value properties before initializing the value. Apparently Value.init() overrides field t with default values.

To verify the bug and the fix, try: println(sciter.NullValue().IsNull(), sciter.NullValue().IsUndefined()). Returns false true before and true false after fixed.

pravic commented 2 years ago

Huh! Good catch!