mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-12 18:30:34 +00:00
fixed buggy arg counting
This commit is contained in:
parent
f9aa220931
commit
a9d506e03f
@ -67,7 +67,7 @@ namespace arg {
|
|||||||
void lshift() { pos++; }
|
void lshift() { pos++; }
|
||||||
|
|
||||||
void shift() {
|
void shift() {
|
||||||
lshift(); if(pos >= size(argument)) { printf("Missing parameter\n"); exit(1); }
|
lshift(); if(pos > size(argument)) { printf("Missing parameter\n"); exit(1); }
|
||||||
}
|
}
|
||||||
|
|
||||||
const string& args() { return argument[pos]; }
|
const string& args() { return argument[pos]; }
|
||||||
|
Loading…
Reference in New Issue
Block a user