View Single Post
  #1  
Old 07-11-2011, 04:32 PM
erde
Sarnak
 
Join Date: Sep 2006
Location: Germany
Posts: 82
Default COMMITTED: *BSD compile fix

strnlen isn't available on the *BSDs (FreeBSD/NetBSD/Mac OS X)

Code:
--- a/zone/client_packet.cpp    Mon Jul 11 20:18:35 2011 +0200
+++ b/zone/client_packet.cpp    Mon Jul 11 22:31:45 2011 +0200
@@ -11773,7 +11773,11 @@
        
        char *GuildName = (char *)app->pBuffer;
 
+#ifdef FREEBSD
+       if(strlen(GuildName) > 60)
+#else
        if(strnlen(GuildName, 64) > 60)
+#endif
        {
                Message(clientMessageError, "Guild name too long.");
                return;
__________________
"Yes, the artwork is awful. I am an engineer, not an artist " - David H. Eberly
Reply With Quote