commit
d84456db12
|
@ -185,7 +185,9 @@ Attribute.prototype.toString = function () {
|
|||
function formatGuid(format, data) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var re = new RegExp('\\{' + i + '\\}', 'g');
|
||||
format = format.replace(re, data[i].toString(16));
|
||||
// Leading 0 is needed if value of data[i] is less than 16 (of 10 as hex).
|
||||
var dataStr = data[i].toString(16);
|
||||
format = format.replace(re, data[i] >= 16 ? dataStr : '0' + dataStr);
|
||||
}
|
||||
return format;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue