Commit 2c7d952d authored by Tristan Cavelier's avatar Tristan Cavelier

fix uuid generator, the first 0 was missing

parent 123cd4b2
......@@ -2,9 +2,13 @@ var jio = function(spec) {
var generateUuid = function () {
var S4 = function () {
return Math.floor(
var i, string = Math.floor(
Math.random() * 0x10000 /* 65536 */
).toString(16);
for (i = string.length; i < 4; i += 1) {
string = '0'+string;
}
return string;
};
return S4() + S4() + "-" +
S4() + "-" +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment