fix generating blank mags by description

This commit is contained in:
Martin Michelsen
2023-06-20 09:24:44 -07:00
parent 0d3da65ca7
commit 63538088d2
+3 -1
View File
@@ -1584,7 +1584,9 @@ ItemData::ItemData(const string& orig_description, bool skip_special) {
} else if (this->data1[0] == 0x02) {
for (const auto& token : split(desc, ' ')) {
if (starts_with(token, "pb:")) { // Photon blasts
if (token.empty()) {
continue;
} else if (starts_with(token, "pb:")) { // Photon blasts
auto pb_tokens = split(token.substr(3), ',');
if (pb_tokens.size() > 3) {
throw runtime_error("too many photon blasts specified");