summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePack/Parser.cpp')
-rw-r--r--cpp/src/IcePack/Parser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpp/src/IcePack/Parser.cpp b/cpp/src/IcePack/Parser.cpp
index 6f5d9d27d7d..9c82492b6bf 100644
--- a/cpp/src/IcePack/Parser.cpp
+++ b/cpp/src/IcePack/Parser.cpp
@@ -146,8 +146,12 @@ IcePack::Parser::getInput(char* buf, int& result, int maxSize)
}
else
{
+#ifdef WIN32
// COMPILERBUG: Stupid Visual C++ defined min and max as macros
result = _MIN(maxSize, static_cast<int>(_commands.length()));
+#else
+ result = min(maxSize, static_cast<int>(_commands.length()));
+#endif
strncpy(buf, _commands.c_str(), result);
_commands.erase(0, result);
if (_commands.empty())