From 8a78285659e245923aef4ce4e394d9986c3c88ce Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Thu, 4 Jul 2013 11:29:18 -0400 Subject: [PATCH] Fixed build. --- core/logic/stringutil.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/logic/stringutil.cpp b/core/logic/stringutil.cpp index 3d8b92e7..9f635086 100644 --- a/core/logic/stringutil.cpp +++ b/core/logic/stringutil.cpp @@ -35,6 +35,11 @@ #include #include "stringutil.h" +// We're in logic so we don't have this from the SDK. +#ifndef MIN +#define MIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) ) +#endif + const char *stristr(const char *str, const char *substr) { if (!*substr) @@ -319,7 +324,7 @@ void UTIL_StripExtension(const char *in, char *out, int outSize) if (end > 0 && !PATHSEPARATOR(in[end]) && end < outSize) { - int nChars = min(end, outSize-1); + int nChars = MIN(end, outSize-1); if (out != in) { memcpy(out, in, nChars);