View Single Post
Zah dud4h

JCF Member

Joined: Dec 2014

Posts: 28

Zah dud4h is doing well so far

Feb 12, 2021, 04:49 PM
Zah dud4h is offline
Quote:
Originally Posted by Violet CLM View Post
Thanks for the report! This bug is news to me but I think I've gotten it fixed locally... I just want to be sure I'm understanding the report right. This sentence I'm having a little trouble parsing:

Because jjSendPacket actually has a bool return value, I was able to see that in my testing, it returns true or false depending on the exact (negative) toClientID argument. When it returns false, packets are not sent to any clients. Does that match what you're seeing, or are we somehow experiencing different (yet related) issues?
So i've tested this again by changing the jjSendPacket line with this bit of code.

Code:
for (int i = 1;i < 32;i++) {
	jjDebug(i + ": did it send? " + jjSendPacket(packet,-i));
}
Apparently the results were:

Quote:
1: did it send? true
2: did it send? false
3: did it send? true
4: did it send? false
5: did it send? false
6: did it send? false
7: did it send? true
8: did it send? true
9: did it send? true
10: did it send? true
11: did it send? true
12: did it send? true
13: did it send? true
14: did it send? true
15: did it send? false
16: did it send? false
17: did it send? false
18: did it send? true
19: did it send? false
20: did it send? false
21: did it send? true
22: did it send? true
23: did it send? true
24: did it send? true
25: did it send? true
26: did it send? true
27: did it send? true
28: did it send? true
29: did it send? true
30: did it send? true
31: did it send? true
The function works as intended when you insert the negative numbers from above that resulted as "true" in the return,aswell as skipping sending packets to the clientID matching it.

However once you insert those who resulted as "false" in the return,it wouldn't send to anybody.

I stand corrected when i claimed it has something to do with a bitwise operator,as this seems to be a different unrelated pattern.
(2, 4, 5, 6, 15, 16, 17, 19, 20)
__________________
.