forked from 0x2620/oxjs
change the signature of Ox.pad to match Ox.truncate
This commit is contained in:
parent
24bbf95bd5
commit
a5c6747b57
10 changed files with 62 additions and 29 deletions
|
|
@ -352,7 +352,7 @@ Ox.load.Image = function(options, callback) {
|
|||
str = Ox[deflate ? 'encodeDeflate' : 'encodeUTF8'](str);
|
||||
len = str.length;
|
||||
// Prefix the string with its length, as a four-byte value
|
||||
str = Ox.pad(Ox.encodeBase256(len), 4, '\u0000') + str;
|
||||
str = Ox.pad(Ox.encodeBase256(len), 'left', 4, '\u0000') + str;
|
||||
str.length > cap && error('encode');
|
||||
while (str.length < cap) {
|
||||
str += str.substr(4, len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue