From bccf9092c21abc23e80ff7e19f4e25bedfc87006 Mon Sep 17 00:00:00 2001 From: Michael Morrison Date: Sat, 17 Jan 2015 21:14:34 -0600 Subject: [PATCH] Remove rounding error on starmade version number, bump version --- package.json | 2 +- protocols/starmade.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1b1c624..8c296db 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ ], "main": "lib/index.js", "author": "Michael Morrison", - "version": "0.2.20", + "version": "0.2.21", "repository" : { "type" : "git", "url" : "https://github.com/sonicsnes/node-gamedig.git" diff --git a/protocols/starmade.js b/protocols/starmade.js index a47fb8d..5d7aa8c 100644 --- a/protocols/starmade.js +++ b/protocols/starmade.js @@ -43,7 +43,7 @@ module.exports = require('./core').extend({ return true; } - if(typeof data[3] == 'number') state.raw.version = data[3]; + if(typeof data[3] == 'number') state.raw.version = data[3].toFixed(7).replace(/0+$/, ''); if(typeof data[4] == 'string') state.name = data[4]; if(typeof data[5] == 'string') state.raw.description = data[5]; if(typeof data[7] == 'number') state.raw.numplayers = data[7];