Skip to content

Commit

Permalink
Fix cmake build regression (#946)
Browse files Browse the repository at this point in the history
  • Loading branch information
otya128 committed Apr 16, 2021
1 parent 2ffe149 commit c75cb90
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions convspec/convspec.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ int main(int argc, char* argv[])
{
for (int i = 2; i < argc; i++)
{
if (!strcmp(argv[i], "--heap"))
if (!strcmp(argv[i], "--heap") && argc > i + 1)
{
spec->heap_size = atoi(argv[++i]);
}
Expand All @@ -96,10 +96,10 @@ int main(int argc, char* argv[])
{
add_ver = 1;
}
else if (i == 2)
else if (argv[i][0] != '-')
{
spec->main_module = xstrdup(argv[2]);
spec->dll_name = xstrdup(argv[2]);
spec->main_module = xstrdup(argv[i]);
spec->dll_name = xstrdup(argv[i]);
}
}
}
Expand Down

0 comments on commit c75cb90

Please sign in to comment.