mirror of
https://github.com/BlackLight/Snort_AIPreproc.git
synced 2024-11-24 04:35:11 +01:00
(Another 64-bit fix)
This commit is contained in:
parent
0636a82ec2
commit
829a6d3616
1 changed files with 3 additions and 3 deletions
6
regex.c
6
regex.c
|
@ -161,15 +161,15 @@ char*
|
||||||
str_replace ( char *str, const char *pattern, const char *sub )
|
str_replace ( char *str, const char *pattern, const char *sub )
|
||||||
{
|
{
|
||||||
char *new_s = NULL;
|
char *new_s = NULL;
|
||||||
unsigned int pos = 0,
|
unsigned long int pos = 0,
|
||||||
new_len = 0;
|
new_len = 0;
|
||||||
|
|
||||||
if ( !( pos = (unsigned int) strstr ( str, pattern )))
|
if ( !( pos = (unsigned long int) strstr ( str, pattern )))
|
||||||
{
|
{
|
||||||
return strdup ( str );
|
return strdup ( str );
|
||||||
}
|
}
|
||||||
|
|
||||||
pos -= (unsigned int) str;
|
pos -= (unsigned long int) str;
|
||||||
new_len = strlen ( str ) - strlen ( pattern ) + ((sub) ? strlen ( sub ) : 0);
|
new_len = strlen ( str ) - strlen ( pattern ) + ((sub) ? strlen ( sub ) : 0);
|
||||||
|
|
||||||
if ( !( new_s = (char*) malloc ( new_len + 1 )))
|
if ( !( new_s = (char*) malloc ( new_len + 1 )))
|
||||||
|
|
Loading…
Reference in a new issue