Skip to content

Commit

Permalink
properly load first resource into bulk storage ResBuf
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuke committed Mar 9, 2024
1 parent 5c36f1a commit 0cbe8fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/toolkit/res_buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class ResBuf {
} else if (rs_present_.count(m) == 1) {
throw KeyError("duplicate resource push attempted");
}
if (!is_bulk_) {
if (!is_bulk_ || rs_.size() == 0) {
rs_.push_back(m);
rs_present_.insert(m);
} else {
Expand Down Expand Up @@ -304,7 +304,7 @@ class ResBuf {
}

for (int i = 0; i < rss.size(); i++) {
if (!is_bulk_) {
if (!is_bulk_ || rs_.size() == 0) {
rs_.push_back(rss[i]);
rs_present_.insert(rss[i]);
} else {
Expand Down

0 comments on commit 0cbe8fe

Please sign in to comment.