Fix segfault caused by off by one error
This commit is contained in:
parent
adea8f719e
commit
f0247ac9c5
@ -201,7 +201,7 @@ static constexpr size_t strlen_pre_eq(const char* str){
|
|||||||
|
|
||||||
#define CHECK_VALID_SHORT_ARG(opt, arg, type) \
|
#define CHECK_VALID_SHORT_ARG(opt, arg, type) \
|
||||||
{ \
|
{ \
|
||||||
if(next_arg == (argc-1) || !is_##type(arg)){ \
|
if(next_arg == argc || !is_##type(arg)){ \
|
||||||
fwprintf(stderr, L"'-%s' requires an argument of type " #type "\n", opt); \
|
fwprintf(stderr, L"'-%s' requires an argument of type " #type "\n", opt); \
|
||||||
ret.error = 1; \
|
ret.error = 1; \
|
||||||
break; \
|
break; \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user