Skip to content
Snippets Groups Projects
Commit b92cd2d0 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix improper use of list_contains() which caused dupe winners to display

De-duplication wasn't working
parent e7eefc49
No related branches found
No related tags found
No related merge requests found
...@@ -332,13 +332,13 @@ function get_winners(level) ...@@ -332,13 +332,13 @@ function get_winners(level)
if(calced == md5) { if(calced == md5) {
if(idx.subject == winner_crc) { if(idx.subject == winner_crc) {
obj.net_addr = hdr.from_net_addr; // Not included in MD5 sum obj.net_addr = hdr.from_net_addr; // Not included in MD5 sum
if(!list_contains(obj)) if(!list_contains(list, obj))
list.push(obj); list.push(obj);
} else { } else {
for(var j = 0; j < obj.game.length; j++) { for(var j = 0; j < obj.game.length; j++) {
var game = obj.game[j]; var game = obj.game[j];
game.net_addr = hdr.from_net_addr; game.net_addr = hdr.from_net_addr;
if(!list_contains(game)) if(!list_contains(list, game))
list.push(game); list.push(game);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment