prepare / Espresso

☕ Bridge your C# soul to the power of Javascript (V8 Javascript Engine / NodeJs)
MIT License
60 stars 11 forks source link

DoGetterProperty and DoSetterProperty #41

Open prepare opened 7 years ago

prepare commented 7 years ago

see https://github.com/prepare/Espresso/issues/40#issuecomment-332093477

dpwhittaker commented 7 years ago

I believe this is in reference to:

One more issue I've identified. When there are more than 127 property accessors in the sytem, the native side starts looking for negative mIndexes in DoGetterProperty and DoSetterProperty. Turned out this was due to the BinaryStreamReader decoding bytes as chars instead of unsigned chars. I switched all the chars to unsigned chars and the problem went away.

The fix is literally replace the 6 lines in mini_BinaryReaderWriter.cpp that look like: char byte0 = this->stream[start]; with: unsigned char byte0 = this->stream[start];