Skip to content

Commit

Permalink
stack overflow bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Spu7Nix committed Dec 24, 2020
1 parent 71167fa commit 60d6213
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spwn-lang/libraries/std/counter.spwn
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ impl @counter {

add: #[desc("Implementation of the pickup trigger")]
(self, #[desc("Amount to add")] num: @number) {
self.add(num)
self.item.add(num)
},

_add_: (self, num: @number | @counter) {
Expand Down
12 changes: 7 additions & 5 deletions spwn-lang/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,13 @@ pub fn compile_scope(
//find out what kind of statement this is
//let start_time = Instant::now();

/*println!(
"{} -> Compiling a statement in {} contexts",
info.path.join(">"),
contexts.len()
);*/
//print_error_intro(info.pos, &info.current_file);

// println!(
// "{} -> Compiling a statement in {} contexts",
// info.path.join(">"),
// contexts.len()
// );
if contexts.is_empty() {
return Err(RuntimeError::RuntimeError {
message: "No context! This is probably a bug, please contact sputnix".to_string(),
Expand Down

0 comments on commit 60d6213

Please sign in to comment.