EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   COMMITTED: *BSD compile fix (https://www.eqemulator.org/forums/showthread.php?t=33847)

erde 07-11-2011 04:32 PM

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;


Derision 07-11-2011 05:02 PM

Thanks. Should be fixed in Rev 1965 :)


All times are GMT -4. The time now is 06:13 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.