Skip to content

Commit

Permalink
Fix bug in pop().
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell Power committed Jan 7, 2014
1 parent 3e24e48 commit f3872b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/falcon/reval.h
Expand Up @@ -68,7 +68,13 @@ struct SmallVector {
}

T pop() {
return vals_[--count_];
if (count_ < kSVBuiltinSlots) {
return vals_[--count_];
} else {
T result = rest_[count_ - kSVBuiltinSlots - 1];
--count_;
return result;
}
}

size_t size() const {
Expand Down

0 comments on commit f3872b4

Please sign in to comment.