Fix primitive handling for dynamic length

This commit is contained in:
Mariusz Nowak
2013-07-22 19:34:28 +02:00
parent aa79f75eb6
commit 748a9aa2d5
2 changed files with 16 additions and 2 deletions

View File

@@ -17,8 +17,8 @@ module.exports = require('./_base')(function (conf, length) {
if (length === 1) {
get = conf.get = serialize1;
} else if (length === false) {
get = conf.get = function (args, length) {
var id = '', i;
get = conf.get = function (args) {
var id = '', i, length = args.length;
if (length) {
id += args[i = 0];
while (--length) id += '\u0001' + args[++i];