Skip to content

Commit

Permalink
removed type check from dup command - fixes #19
Browse files Browse the repository at this point in the history
  • Loading branch information
usefulmove committed Jul 11, 2022
1 parent 4086c02 commit 2ddb47d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/comp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::num::ParseIntError;
use std::path::Display;
use std::path::Path;

const RELEASE_STATUS: &str = "q";
const RELEASE_STATUS: &str = "r";

/*
Expand Down Expand Up @@ -375,10 +375,10 @@ impl Interpreter {
fn c_dup(&mut self, op: &str) {
Interpreter::check_stack_error(self, 1, op);

let a: f64 = self.pop_stack_f();
let end: usize = self.stack.len() - 1;
let o: String = self.stack[end].clone(); // remove last

self.stack.push(a.to_string());
self.stack.push(a.to_string());
self.stack.push(o);
}

fn c_swap(&mut self, op: &str) {
Expand Down

0 comments on commit 2ddb47d

Please sign in to comment.