mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
BIFScanner: Make filename->symbol transformation more robust
When trying to build bro from a path that contained a plus sign, an invalid symbol name for the #ifdef guard was generated.
This commit is contained in:
parent
d17aedcc44
commit
fc71572aad
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
%{
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "bif_arg.h"
|
||||
|
@ -223,7 +224,7 @@ void init_alternative_mode()
|
|||
|
||||
for ( char* p = guard; *p; p++ )
|
||||
{
|
||||
if ( strchr("/.-", *p) )
|
||||
if ( !isalnum (*p) )
|
||||
*p = '_';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue