Skip to content

Commit

Permalink
Ensure if checks for both paths are part of the same block
Browse files Browse the repository at this point in the history
  • Loading branch information
islas committed Dec 2, 2024
1 parent a5413ef commit 746b2a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/reg_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pre_parse( char * dir, FILE * infile, FILE * outfile )
p += 7 ; for ( ; ( *p == ' ' || *p == ' ' ) && *p != '\0' ; p++ ) ;
fprintf( stderr, "Len : %d\n", strlen( p ) );
if ( strlen( p ) > MAX_PATH - 1 ) { fprintf(stderr,"Registry error: include file name too long: %s\n", p ) ; }
if ( ( strlen( p ) + strlen( dir ) ) > MAX_PATH - 1 ) { fprintf(stderr,"Registry error: include file name too long when adding path: %s/%s\n", dir, p ) ; }
else if ( ( strlen( p ) + strlen( dir ) ) > MAX_PATH - 1 ) { fprintf(stderr,"Registry error: include file name too long when adding path: %s/%s\n", dir, p ) ; }
else {

sprintf( include_file_name_local_registry, "./Registry/%s", p ) ;
Expand Down

0 comments on commit 746b2a9

Please sign in to comment.