# HG changeset patch # User John "Elwin" Edwards # Date 1420333662 18000 # Node ID 5a7e7ec136c8be05b3105b03855db2735775ca10 # Parent a2a25b7631f1d1c06784fc0867ac66afd8a20f4b Properly print session tags in the log. They are Strings and should not be formatted with %d. diff -r a2a25b7631f1 -r 5a7e7ec136c8 rlgwebd.js --- a/rlgwebd.js Sat Jan 03 20:03:49 2015 -0500 +++ b/rlgwebd.js Sat Jan 03 20:07:42 2015 -0500 @@ -161,7 +161,7 @@ this.framebuf.copy(nbuf, 0, 0, this.frameoff); this.framebuf = nbuf; if (this.framebuf.length > 65536) { - tslog("Warning: Game %d frame buffer at %d bytes", this.tag(), + tslog("Warning: Game %s frame buffer at %d bytes", this.tag(), this.framebuf.length); } } @@ -207,7 +207,7 @@ session.removeListener('data', dataH); session.removeListener('exit', exitH); if (session.tag() in sessions) - tslog("A WebSocket watcher has left game %d", session.tag()); + tslog("A WebSocket watcher has left game %s", session.tag()); }); conn.sendUTF(JSON.stringify({ "t": "w", "w": session.w, "h": session.h, @@ -936,7 +936,7 @@ var tsession = sessions[watchmatch[1]]; var conn = wsRequest.accept(null, wsRequest.origin); new wsWatcher(conn, tsession); - tslog("Game %d is being watched via WebSockets", tsession.tag()); + tslog("Game %s is being watched via WebSockets", tsession.tag()); } else if (playmatch !== null) { wsStart(wsRequest);