Skip to content

Commit b6abeea

Browse files
committed
曖昧なコードを回避し明確にする
Signed-off-by: uupaa <[email protected]>
1 parent 8f050fd commit b6abeea

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

msgpack.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,14 @@ function decode() { // @return Mix:
239239
return type;
240240
}
241241
if (type < 0x90) { // FixMap (1000 xxxx)
242-
num = type - (type = 0x80);
242+
num = type - 0x80;
243+
type = 0x80;
243244
} else if (type < 0xa0) { // FixArray (1001 xxxx)
244-
num = type - (type = 0x90);
245+
num = type - 0x90;
246+
type = 0x90;
245247
} else if (type < 0xc0) { // FixRaw (101x xxxx)
246-
num = type - (type = 0xa0);
248+
num = type - 0xa0;
249+
type = 0xa0;
247250
}
248251
switch (type) {
249252
case 0xc0: return null;

0 commit comments

Comments
 (0)