X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=common.c;h=c9248464517a1642835cd06effb11b7af39b76c5;hb=1c178ccff915a886bb70d108773c9e779552b6d7;hp=f5d4ba208b67c0aa862a7ba27b511bec43cc9959;hpb=0c2fe5508d2cbafb6d3d2d003c819e9d1b72c6f5;p=xonotic%2Fdarkplaces.git diff --git a/common.c b/common.c index f5d4ba20..c9248464 100644 --- 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 {