hengineer / CaptainsMess

A local multiplayer networking library for making games like Spaceteam in Unity
MIT License
184 stars 20 forks source link

Certain broadcast identifiers can lead to a invalid broadcast key #8

Closed Nestorferrando closed 8 years ago

Nestorferrando commented 8 years ago

Hi again! sorry for the spam, but I've been doing intensive test to this module as we are preparing a prototype using it. If you don't mind I'll keep posting bugs and what I did to fix it.

How to reproduce the error: set broadcast identifier to "asdasd2" try to connect.

The set broadcast key is negative and Unity launches an exception.

I solved it just by setting the absolute value of the identifier hashcode instead of just the hashcode itself.

hengineer commented 8 years ago

Thanks a lot, these are some great discoveries!