aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-07-16 22:07:45 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-07-16 22:07:45 -0400
commitdf8c98f96deb3f0b817e1ab3270fe74b2cca1450 (patch)
treecdc7e3e57b27088a84cda46ce94f9120f8ec5106 /tools
parentb62c8fd41cf32ea33de9d4f74415c665d315ecb1 (diff)
split out nullprint and set up space.regex multi-return
Diffstat (limited to 'tools')
-rw-r--r--tools/search.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/search.js b/tools/search.js
index 56137b8..eafb2bf 100644
--- a/tools/search.js
+++ b/tools/search.js
@@ -32,8 +32,9 @@ function Search(){ // searchBlock should be a Space object.
searchspace.comb( this.tiles[tile], comb.add );
});
for (let i=0; i<this.spaces.length; i++){
- let coords = searchspace.regex(this.spaces[i]);
- if (coords.length) this.calls[i](vec.add(coords, searchspace.loc), send, searchspace);
+ let coords = searchspace.regex(this.spaces[i])[0];
+ if (coords) this.calls[i](vec.add(coords, searchspace.loc), send,
+ searchspace);
}
}