From 21b52de1fd9b23a518dcdf5f9f1f145e5e186eb5 Mon Sep 17 00:00:00 2001 From: n-a-c-h <> Date: Tue, 14 Feb 2006 04:17:46 +0000 Subject: [PATCH] Fixed some funny linking. --- zsnes/src/win/winlink.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/zsnes/src/win/winlink.cpp b/zsnes/src/win/winlink.cpp index 3511504e..30ae8013 100644 --- a/zsnes/src/win/winlink.cpp +++ b/zsnes/src/win/winlink.cpp @@ -3140,26 +3140,25 @@ int CheckBatteryPercent() return((SysPowerStat.BatteryLifePercent == 255) ? -1 : SysPowerStat.BatteryLifePercent); } -extern "C" { - extern unsigned int PrevBuildNum; - char *VERSION_STR; - void placedate(); - void placetime(); -} +extern "C" unsigned int PrevBuildNum; +extern "C" char *VERSION_STR; void DisplayWIPDisclaimer() { + void placedate(); + void placetime(); + // This stupid function calculates a build hash based on the build date unsigned int ver_len = sizeof(__DATE__) + sizeof(__TIME__) + 10; //+10 because some names are longer than others - VERSION_STR = new char[ver_len]; + VERSION_STR = (char *)malloc(ver_len); *VERSION_STR = 0; placedate(); placetime(); unsigned int CurrentBuildNum = ~crc32(0, (const unsigned char *)VERSION_STR, ver_len); - delete[] VERSION_STR; + free(VERSION_STR); if (CurrentBuildNum != PrevBuildNum) {