Skip to content

Commit

Permalink
Attempt to get rid of a warning on mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin Howard committed Oct 12, 2018
1 parent 2bc50a9 commit 8461a04
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/program.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ char* bc_program_name(char *code, size_t *bgn) {
size_t len, i;
char byte, *s, *string = (char*) (code + *bgn), *ptr;

ptr = strchr(string, BC_PARSE_STREND);
if (ptr) len = ((unsigned long long) ptr) - ((unsigned long long) string);
if ((ptr = strchr(string, BC_PARSE_STREND))) len = ptr - string;
else len = strlen(string);

if (!(s = malloc(len + 1))) return NULL;
Expand Down

0 comments on commit 8461a04

Please sign in to comment.