1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-02-01 23:40:15 +00:00

ru:: load-world ignores extra spaces in paramaters

This commit is contained in:
Zeno Rogue
2025-12-22 14:02:29 +01:00
parent 96a6f8a721
commit ebdf3d6795

View File

@@ -152,6 +152,7 @@ void load_room(fhstream& f, cell *c) {
string cap = s.substr(0, pos);
string param = s.substr(pos+1) + " ";
auto cutoff = [&] (const string& val) {
while(param != "" && among(param[0], ' ', '\t')) param = param.substr(1);
if(param == "") { println(hlog, "parameter missing"); return val; }
pos = param.find(" "); auto res = param.substr(0, pos); param = param.substr(pos + 1);
return res;