From 829a6d3616bf09ad017ea12460f4a104fa186f32 Mon Sep 17 00:00:00 2001 From: BlackLight Date: Thu, 10 Feb 2011 00:56:08 +0100 Subject: [PATCH] (Another 64-bit fix) --- regex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/regex.c b/regex.c index ce10576..350b00c 100644 --- a/regex.c +++ b/regex.c @@ -161,15 +161,15 @@ char* str_replace ( char *str, const char *pattern, const char *sub ) { char *new_s = NULL; - unsigned int pos = 0, + unsigned long int pos = 0, new_len = 0; - if ( !( pos = (unsigned int) strstr ( str, pattern ))) + if ( !( pos = (unsigned long int) strstr ( str, pattern ))) { return strdup ( str ); } - pos -= (unsigned int) str; + pos -= (unsigned long int) str; new_len = strlen ( str ) - strlen ( pattern ) + ((sub) ? strlen ( sub ) : 0); if ( !( new_s = (char*) malloc ( new_len + 1 )))