From 7cd914538f16b9bcd56b8340a353429a43273fc4 Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Fri, 11 Apr 2014 09:59:24 -0700 Subject: [PATCH] strdup to _strdup change for windows --- zone/command.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zone/command.cpp b/zone/command.cpp index 3e71745c9..da4188f9a 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -4474,7 +4474,11 @@ void command_name(Client *c, const Seperator *sep) else { target = c->GetTarget()->CastToClient(); +#ifdef _WINDOWS + char *oldname = _strdup(target->GetName()); +#else char *oldname = strdup(target->GetName()); +#endif if(target->ChangeFirstName(sep->arg[1], c->GetName())) { c->Message(0, "Successfully renamed %s to %s", oldname, sep->arg[1]); @@ -4497,7 +4501,11 @@ void command_tempname(Client *c, const Seperator *sep) c->Message(0, "Usage: #tempname newname (requires a target)"); else if(strlen(sep->arg[1]) > 0) { +#ifdef _WINDOWS + char *oldname = _strdup(target->GetName()); +#else char *oldname = strdup(target->GetName()); +#endif target->TempName(sep->arg[1]); c->Message(0, "Renamed %s to %s", oldname, sep->arg[1]); free(oldname);