File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ function discoverPlaceholder(
47
47
}
48
48
49
49
/**
50
- * the PAYLOAD/PRELUDE placeholders occur twice in the binaries:
50
+ * the PAYLOAD/PRELUDE placeholders can occur twice in the binaries:
51
51
* - in source text as a string literal
52
52
* - in bytecode as a raw string
53
53
* the ordering depends on the platform - we need to make sure that
@@ -57,12 +57,15 @@ function discoverPlaceholder(
57
57
* also see: https://github.com/yao-pkg/pkg/pull/86
58
58
*/
59
59
if ( binaryBuffer [ position - 1 ] === 39 /* ascii for ' APOSTROPHE */ ) {
60
- return discoverPlaceholder (
60
+ const nextPlaceholder = discoverPlaceholder (
61
61
binaryBuffer ,
62
62
searchString ,
63
63
padder ,
64
64
position + placeholder . length ,
65
65
) ;
66
+ if ( ! ( 'notFound' in nextPlaceholder ) ) {
67
+ return nextPlaceholder ;
68
+ }
66
69
}
67
70
68
71
return { position, size : placeholder . length , padder } ;
You can’t perform that action at this time.
0 commit comments