diff --git a/zsnes/src/win/winlink.cpp b/zsnes/src/win/winlink.cpp index 544a327c..3511504e 100644 --- a/zsnes/src/win/winlink.cpp +++ b/zsnes/src/win/winlink.cpp @@ -27,9 +27,9 @@ extern "C" { #include #include #include - //#include #include #include + #include } #include #include @@ -3140,26 +3140,33 @@ int CheckBatteryPercent() return((SysPowerStat.BatteryLifePercent == 255) ? -1 : SysPowerStat.BatteryLifePercent); } -extern "C" unsigned int PrevBuildNum; +extern "C" { + extern unsigned int PrevBuildNum; + char *VERSION_STR; + void placedate(); + void placetime(); +} void DisplayWIPDisclaimer() { // This stupid function calculates a build hash based on the build date - unsigned int CurrentBuildNum = 0; - char *BuildWorkBuffer = (char *) malloc(sizeof(__DATE__)); + unsigned int ver_len = sizeof(__DATE__) + sizeof(__TIME__) + 10; //+10 because some names are longer than others - strcpy(BuildWorkBuffer, __DATE__); + VERSION_STR = new char[ver_len]; + *VERSION_STR = 0; + placedate(); + placetime(); - for (unsigned int i = 0; i