From 9798ce83e02a80e410d0d72eeb3102857b0e7fdd Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Tue, 23 Dec 2014 12:38:23 +0000 Subject: [PATCH] Pad CRC strings to 8 characters. Closes #290. --- resources/report/js/plugin.js | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/resources/report/js/plugin.js b/resources/report/js/plugin.js index d35f5dcf..a21db10a 100644 --- a/resources/report/js/plugin.js +++ b/resources/report/js/plugin.js @@ -109,7 +109,8 @@ function Plugin(obj) { if (this.crc == 0) { return ''; } else { - return this.crc.toString(16).toUpperCase(); + /* Pad CRC string to 8 characters. */ + return ('00000000' + this.crc.toString(16).toUpperCase()).slice(-8); } } @@ -204,23 +205,3 @@ function jsonToPlugin(key, value) { } return value; } - - - - - - - - - - - - - - - - - - - -