]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.c
changed the Sys_Error to a Con_Printf. LordHavoc, please check if the equation REALLY...
[xonotic/darkplaces.git] / common.c
index f5d4ba208b67c0aa862a7ba27b511bec43cc9959..c9248464517a1642835cd06effb11b7af39b76c5 100644 (file)
--- a/common.c
+++ b/common.c
@@ -1489,6 +1489,9 @@ static const gamemode_info_t gamemode_info [GAME_COUNT] =
 // GAME_BLADEMASTER
 // COMMANDLINEOPTION: Game: -blademaster runs the game Prophecy: Return of the BladeMaster
 { "blademaster", "-blademaster", "Prophecy: Return of the BladeMaster", "basebm", NULL, "blademaster", "blademaster" },
+// GAME_PROPHECY
+// COMMANDLINEOPTION: Game: -prophecy runs the game Quake (default)
+{ "prophecy",                          "-prophecy",            "Prophecy",             "data",         NULL,                   "prophecy",                     "prophecy" },
 };
 
 void COM_InitGameType (void)
@@ -1620,7 +1623,11 @@ int dpvsnprintf (char *buffer, size_t buffersize, const char *format, va_list ar
 {
        int result;
 
+#if _MSC_VER >= 1400
+       result = _vsnprintf_s (buffer, buffersize, _TRUNCATE, format, args);
+#else
        result = vsnprintf (buffer, buffersize, format, args);
+#endif
        if (result < 0 || (size_t)result >= buffersize)
        {
                buffer[buffersize - 1] = '\0';
@@ -2023,7 +2030,7 @@ void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, con
                // set the key/value and append the remaining text
                char tempbuffer[4096];
                strlcpy(tempbuffer, buffer + pos2, sizeof(tempbuffer));
-               sprintf(buffer + pos, "\\%s\\%s%s", key, value, tempbuffer);
+               dpsnprintf(buffer + pos, bufferlength - pos, "\\%s\\%s%s", key, value, tempbuffer);
        }
        else
        {