Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e554fd9

Browse files
authored
Update regrass.cpp
1 parent 1b55e86 commit e554fd9

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

plugins/regrass.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ command_result df_regrass(color_ostream &out, vector<string> &parameters)
377377
{
378378
regrass_options options;
379379

380-
for (size_t i = 0; i < parameters.size(); i++)
380+
for (size_t i = 0; i < parameters.size(); i++) // TODO: argparse
381381
{
382382
auto &s = parameters[i];
383383
if (s == "m" || s == "max")
@@ -388,14 +388,22 @@ command_result df_regrass(color_ostream &out, vector<string> &parameters)
388388
options.ashes = true;
389389
else if (s == "u" || s == "mud")
390390
options.mud = true;
391-
else if (s == "p" || s == "here")
391+
else if (s == "h" || s == "here")
392392
options.here = true;
393393
else if (s == "b" || s == "block")
394394
options.block = true;
395-
else // "h", "help", invalid
395+
else // invalid
396396
return CR_WRONG_USAGE;
397397
}
398398

399+
if (options.here)
400+
{
401+
if (options.block)
402+
return CR_WRONG_USAGE;
403+
options.ashes = true;
404+
options.mud = true;
405+
}
406+
399407
if (!Core::getInstance().isMapLoaded())
400408
{
401409
out.printerr("Map not loaded!\n");

0 commit comments

Comments
 (0)