X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fhash.c;h=876b92f5e41c18fc222151dc28a573839ea4677a;hb=8430c55733daf6ba50307fa03ab673222c3e14a8;hp=d6cb516a002161a8b616998dd75ad91154b9a025;hpb=b422b11865a6243c070983e3a80ea226904f0edc;p=ngircd-alex.git diff --git a/src/ngircd/hash.c b/src/ngircd/hash.c index d6cb516a..876b92f5 100644 --- a/src/ngircd/hash.c +++ b/src/ngircd/hash.c @@ -9,7 +9,7 @@ * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. * - * $Id: hash.c,v 1.2 2002/03/14 15:49:36 alex Exp $ + * $Id: hash.c,v 1.4 2002/03/25 19:11:01 alex Exp $ * * hash.c: Hash-Werte berechnen */ @@ -19,6 +19,11 @@ #include "imp.h" #include +#include + +#include "defines.h" +#include "log.h" +#include "tool.h" #include "exp.h" #include "hash.h" @@ -30,7 +35,13 @@ LOCAL UINT32 jenkins_hash( register UINT8 *k, register UINT32 length, register U GLOBAL UINT32 Hash( CHAR *String ) { /* Hash-Wert ueber String berechnen */ - return jenkins_hash( String, strlen( String ), 42 ); + + CHAR buffer[LINE_LEN]; + + strncpy( buffer, String, LINE_LEN - 1 ); + buffer[LINE_LEN - 1] = '\0'; + + return jenkins_hash( (UINT8 *)ngt_LowerStr( buffer ), strlen( buffer ), 42 ); } /* Hash */