fix: if no value for p passed, set default value to 4

This commit is contained in:
Renge 2022-02-12 16:50:01 -05:00
parent c85f4e85a1
commit 8203b3daba

View File

@ -78,13 +78,15 @@ int validargs(int argc, char **argv)
{
return -1;
}
global_options = PRETTY_PRINT_OPTION;
if (argc == 3)
{
global_options = PRETTY_PRINT_OPTION;
global_options += 4;
return 0;
}
else if (argc == 4)
{
global_options = PRETTY_PRINT_OPTION;
int indent_value = 0;
arg = *(++ptr);
while (*arg != '\0')