diff --git a/src/core/common/crypthelper.cpp b/src/core/common/crypthelper.cpp index c25a4352..44bcb375 100644 --- a/src/core/common/crypthelper.cpp +++ b/src/core/common/crypthelper.cpp @@ -271,8 +271,7 @@ CryptHelper::AES128Encrypt(const unsigned char *keyData, unsigned keySize, const BytesToKey(keyData, keySize, key, iv); // Add padding to plain data. unsigned paddedPlainSize = ADD_PADDING(plainSize); - unsigned char *paddedPlainStr = new unsigned char[ADD_PADDING(plainSize)]; - memset(paddedPlainStr, 0, paddedPlainSize); + unsigned char *paddedPlainStr = (unsigned char *)calloc(paddedPlainSize, 1); memcpy(paddedPlainStr, plainStr.c_str(), plainSize); // Perform the encryption. int cipherSize = paddedPlainSize; @@ -311,7 +310,7 @@ CryptHelper::AES128Encrypt(const unsigned char *keyData, unsigned keySize, const gcry_cipher_close(hd); #endif - delete[] paddedPlainStr; + free(paddedPlainStr); } return retVal; } diff --git a/src/engine/local_engine/localbero.cpp b/src/engine/local_engine/localbero.cpp index 4a2f64fe..10bbc15d 100644 --- a/src/engine/local_engine/localbero.cpp +++ b/src/engine/local_engine/localbero.cpp @@ -96,10 +96,11 @@ void LocalBeRo::run() PlayerListIterator it_1, it_2; - // running player before smallBlind - bool formerRunningPlayerFound = false; if(myHand->getActivePlayerList()->size() > 2) { + // running player before smallBlind + bool formerRunningPlayerFound = false; + it_1 = myHand->getActivePlayerIt(smallBlindPositionId); if(it_1 == myHand->getActivePlayerList()->end()) { throw LocalException(__FILE__, __LINE__, ERR_ACTIVE_PLAYER_NOT_FOUND); diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index 79de86bb..204daa30 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -2023,11 +2023,9 @@ void gameTableImpl::myCheck() int gameTableImpl::getMyCallAmount() { - int tempHighestSet = 0; - boost::shared_ptr currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand(); boost::shared_ptr humanPlayer = currentHand->getSeatsList()->front(); - tempHighestSet = currentHand->getCurrentBeRo()->getHighestSet(); + int tempHighestSet = currentHand->getCurrentBeRo()->getHighestSet(); if (humanPlayer->getMyCash() + humanPlayer->getMySet() <= tempHighestSet) { @@ -2065,11 +2063,10 @@ int gameTableImpl::getMyBetAmount() void gameTableImpl::myCall() { - int tempHighestSet = 0; boost::shared_ptr currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand(); boost::shared_ptr humanPlayer = currentHand->getSeatsList()->front(); - tempHighestSet = currentHand->getCurrentBeRo()->getHighestSet(); + int tempHighestSet = currentHand->getCurrentBeRo()->getHighestSet(); if (humanPlayer->getMyCash() + humanPlayer->getMySet() <= tempHighestSet) { diff --git a/src/gui/qt/sound/soundevents.h b/src/gui/qt/sound/soundevents.h index f5f954f2..24fd9dcc 100644 --- a/src/gui/qt/sound/soundevents.h +++ b/src/gui/qt/sound/soundevents.h @@ -15,6 +15,11 @@ public: void newGameStarts(); void playSound(std::string audioString, int playerID); +protected: + // Prevent copy construction. + // This is only a declaration. + SoundEvents(const SoundEvents &); + private: SDLPlayer *mySDLPlayer; ConfigFile *myConfig; diff --git a/win_create_release.sh b/win_create_release.sh index 30b11d4f..e5a41ddb 100755 --- a/win_create_release.sh +++ b/win_create_release.sh @@ -9,9 +9,9 @@ if [[ -n "$1" && -n "$2" ]] ; then find ./PokerTH-$1/ -name ".svn" | xargs rm -Rf zip -r PokerTH-$1-windows.zip ./PokerTH-$1 - ~/bitrock-installbuilder/installbuilder-7.2.5/bin/builder build ~/slave/pokerth-release-win32/build/pokerth_bitrock_windows.xml windows + ~/bitrock-installbuilder/bin/builder build ~/slave/pokerth-release-win32/build/pokerth_bitrock_windows.xml windows - mv ~/bitrock-installbuilder/installbuilder-7.2.5/output/PokerTH-$1-windows-installer.exe . + mv ~/bitrock-installbuilder/output/PokerTH-$1-windows-installer.exe . scp PokerTH-$1-windows-installer.exe PokerTH-$1-windows.zip lotodore,pokerth@frs.sourceforge.net:/home/frs/project/p/po/pokerth/pokerth/$2/ md5sum PokerTH-$1-windows-installer.exe rm PokerTH-$1-windows-installer.exe