Changeset 1007 for Daodan/src


Ignore:
Timestamp:
Jul 4, 2014, 5:42:25 PM (10 years ago)
Author:
alloc
Message:

Daodan 3.8: Fix msvcrt incompatibility on XP

Location:
Daodan/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/Daodan_Config.c

    r1000 r1007  
    1919static const char* defaultSection = "options";
    2020
    21 static char invalidCurParamaters[1000] = "";
    22 static char invalidTotalParamaters[3000] = "";
     21static char invalidCurParamaters[2000] = "";
     22static char invalidTotalParamaters[4000] = "";
    2323
    2424void DDrConfig_PrintHelp();
     
    531531                }
    532532        } else {
    533                 char buf[50];
     533                char buf[100];
    534534                if (!_stricmp(section, "*"))
    535                         sprintf_s(buf, sizeof(buf), "  %s\n", name);
     535                        sprintf(buf, "  %s\n", name);
    536536                else
    537                         sprintf_s(buf, sizeof(buf), "  %s.%s\n", section, name);
     537                        sprintf(buf, "  %s.%s\n", section, name);
    538538                if (strlen(buf) + strlen(invalidCurParamaters) < sizeof(invalidCurParamaters) - 1) {
    539539                        strcpy(invalidCurParamaters + strlen(invalidCurParamaters), buf);
     
    593593        if (strlen(invalidCurParamaters) > 0)
    594594        {
    595                 sprintf_s(invalidTotalParamaters, sizeof(invalidTotalParamaters), "In %s:\n%s\n", iniName, invalidCurParamaters);
     595                sprintf(invalidTotalParamaters, "In %s:\n%s\n", iniName, invalidCurParamaters);
    596596                invalidCurParamaters[0] = 0;
    597597        }
     
    603603        if (strlen(invalidCurParamaters) > 0)
    604604        {
    605                 sprintf_s(invalidTotalParamaters, sizeof(invalidTotalParamaters), "%sOn command line:\n%s\n", invalidTotalParamaters, invalidCurParamaters);
     605                sprintf(invalidTotalParamaters, "%sOn command line:\n%s\n", invalidTotalParamaters, invalidCurParamaters);
    606606        }
    607607
    608608        if (strlen(invalidTotalParamaters) > 0)
    609609        {
    610                 char msg[3200];
    611                 sprintf_s(msg, sizeof(msg), "Invalid parameters given:\n%sContinue launching Oni?", invalidTotalParamaters);
     610                char msg[4096];
     611                sprintf(msg, "Invalid parameters given:\n%sContinue launching Oni?", invalidTotalParamaters);
    612612                int res = MessageBox(NULL, msg, "Parameters invalid", MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON1);
    613613                if (res == IDNO) {
  • Daodan/src/_Version.h

    r990 r1007  
    66
    77#define DAODAN_VERSION_MAJOR 3
    8 #define DAODAN_VERSION_MINOR 7
     8#define DAODAN_VERSION_MINOR 8
    99#define DAODAN_VERSION_STRING STRINGIZE(DAODAN_VERSION_MAJOR) "." STRINGIZE(DAODAN_VERSION_MINOR)
    1010
Note: See TracChangeset for help on using the changeset viewer.