Skip to content

Commit daa485a

Browse files
authored
more fixes
1 parent 0993b00 commit daa485a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/extensions/jwPointer/index.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ class PointerType {
3737

3838
static toPointer(x) {
3939
if (x instanceof PointerType) return x;
40-
41-
let num = Cast.toNumber(x);
42-
if (num <= pointerLimit) return new PointerType(num);
43-
4440
return new PointerType(0);
4541
}
4642

@@ -190,7 +186,7 @@ class Extension {
190186
arguments: {
191187
ID: {
192188
type: ArgumentType.NUMBER,
193-
defaultValue: 0
189+
defaultValue: 1
194190
}
195191
},
196192
...Pointer.Block
@@ -269,8 +265,13 @@ class Extension {
269265
},
270266
{
271267
opcode: "isPointer",
272-
text: "is [input] a pointer?",
273-
blockType: BlockType.BOOLEAN
268+
text: "is [INPUT] a pointer?",
269+
blockType: BlockType.BOOLEAN,
270+
arguments: {
271+
INPUT: {
272+
POINTER: Pointer.Argument
273+
}
274+
}
274275
},
275276
...(vm.runtime.ext_jwArray ? ["---"] : []),
276277
{

0 commit comments

Comments
 (0)