From 7e294b21366f86acbcd3dc61f2f828c6f75b8aee Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Sat, 3 Jan 2015 20:07:42 -0500 Subject: [PATCH] Properly print session tags in the log. They are Strings and should not be formatted with %d. --- rlgwebd.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rlgwebd.js b/rlgwebd.js index 6756e97..80158b9 100755 --- a/rlgwebd.js +++ b/rlgwebd.js @@ -161,7 +161,7 @@ function TermSession(game, lkey, dims, handlers) { 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 @@ function wsWatcher(conn, session) { 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 @@ function wsHandler(wsRequest) { 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);