ID:1960893
 
Resolved
Regression in 509.1306: bitwise operations between non-numeric values were broken. This is a compiler fix.
BYOND Version:509.1306
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Chrome 45.0.2454.101
Applies to:Dream Maker
Status: Resolved (509.1309)

This issue has been resolved.
Descriptive Problem Summary:

One day while playtesting Severed World, we stumbled upon a really interesting bug in our AI that made them totally rabid little things: they had begun indiscriminately attacking eachother when they were not supposed to!

[Gif]

It didn't take long for me to figure out that the problem wasn't on our end, it was how we were handling who can attack who in our code. Long story short, the AI decides who it can attack by comparing its own 'team' member to its potential enemies', via the & operator. Unfortunately it now seems to be broken, can't say which release broke it though.

list("lol") & list("heh")

This returns an empty /list as intended.

list("lol") & list("lol")

This is supposed to return list("lol") but instead, it returns empty.


This could be a problem exclusive to string comparisons, though - have not yet tried the & operator with non-string data.
Strings should be no different than any other type for that purpose. I'll look into it.
I can't reproduce this in 1305.

mob/verb/test()
var l = "lol"
var list
x = (list("lol") & list("lol"))
y = (list("lol") & list("heh"))
z = (list(src) & list(src))
a = (list(l) & list(l))
world << "x contents: [list2params(x)]"
world << "y contents: [list2params(y)]"
world << "z contents: [list2params(z)]"
world << "a contents: [list2params(a)]"


x contents: lol
y contents:
z contents: Super+Saiyan+X
a contents: lol
In response to Super Saiyan X
Which version of BYOND are you using?
1305. Huh. That's such an odd regression if it began happening with 1306 and 1307.

Maybe id:1959790 broke it, somehow.
Lummox JR resolved issue with message:
Regression in 509.1306: bitwise operations between non-numeric values were broken. This is a compiler fix.
In response to Super Saiyan X
You called it. Feh. Wish this report had come in before the 1307 release, but oh well.
Does not seem to be fixed in 509.1308.
Did you recompile?

[edit]
Aw, frell. I thought I checked over everything thoroughly, but it looks like the code that changed didn't get checked in prior to the build. Sorry about that. I'll change the resolution note.
Ah, alright! No worries.
damn it!