rlgterm.js: fix failure to recognize end of game

The RLG-Web client was failing to realize the game was over, because
a test was checking against the entire response instead of the proper
field in the response.
This commit is contained in:
John "Elwin" Edwards 2012-06-09 10:44:11 -07:00
parent e0a70e4b0e
commit 7e88c7cdc3

View file

@ -142,7 +142,7 @@ function processMsg(msg) {
if (!msgDict.t) if (!msgDict.t)
return null; return null;
else if (msgDict.t == "E") { else if (msgDict.t == "E") {
if (msgDict.c == 1 || msgDict.c == 6 || msgDict == 7) { if (msgDict.c == 1 || msgDict.c == 6 || msgDict.c == 7) {
gameover(); gameover();
} }
debug(1, "Server error: " + msgDict.s); debug(1, "Server error: " + msgDict.s);