durs / node-activex

Node.JS Implementaion of ActiveXObject
MIT License
329 stars 62 forks source link

Test for VARIANT_BOOL check should be reversed #100

Closed JPags closed 3 years ago

JPags commented 3 years ago

case VT_BOOL: return Boolean::New(isolate, (by_ref ? *v.pboolVal : v.boolVal) == VARIANT_TRUE);

I ran into an issue with code that has worked for ever. I was returning a 1 for a VARIANT_BOOL rather than a FFFF, this code has worked fine for along time and it returns true when I use the object from Internet Explorer. I read your code and realized that VARIANT_TRUE is FFFF, when I changed my code everything worked and now I get the correct return in node too, but I thing your test should be for VARIANT_FALSE since really any non 0 value is considered true not just VARIANT_TRUE

Just thought I would mention it. Took me several hours to figure out why i was always getting false for my return value.

durs commented 3 years ago

Сorrection accepted, thanks