From 1ae04540eadca33aa50ea1f06c90b96badaaf046 Mon Sep 17 00:00:00 2001 From: Akiko Date: Tue, 19 May 2015 11:57:32 +0200 Subject: [PATCH] - fixed fprint parameters - fixed a boolean/bitwise operation - fixed an include --- TinNS/Source/Common/Message.cxx | 4 ++-- TinNS/Source/GameServer/Definitions/WorldModels.cxx | 4 ++-- TinNS/Source/GameServer/GameCommands/T.cxx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TinNS/Source/Common/Message.cxx b/TinNS/Source/Common/Message.cxx index cca2d3c..e3bb8ef 100644 --- a/TinNS/Source/Common/Message.cxx +++ b/TinNS/Source/Common/Message.cxx @@ -410,12 +410,12 @@ void PMessage::Dump() Console->Print("Buffer from pool %d (max size %d), used 0x%04hx (%d) , data at 0x%08x", mPoolId, smMsgSizes[mPoolId], mUsedSize, mUsedSize, tmpBuff); for (i = 0; i < mUsedSize; i += 16) { - snprintf(tmpStr, 64, "\t%04hx:",i); + snprintf(tmpStr, 64, "\t%04x:",i); sDump = tmpStr; sAsciiDump = ""; for (j = 0; (j < 16) && ((i+j) < mUsedSize); j++) { - snprintf(tmpStr, 64, " %02hx",(uint8_t)tmpBuff[i+j]); + snprintf(tmpStr, 64, " %02hhx",(uint8_t)tmpBuff[i+j]); sDump += tmpStr; sAsciiDump += ((tmpBuff[i+j]>'\x19') && (tmpBuff[i+j]<'\x7F')) ? tmpBuff[i+j] : '.'; } diff --git a/TinNS/Source/GameServer/Definitions/WorldModels.cxx b/TinNS/Source/GameServer/Definitions/WorldModels.cxx index b57113d..68a3c7f 100644 --- a/TinNS/Source/GameServer/Definitions/WorldModels.cxx +++ b/TinNS/Source/GameServer/Definitions/WorldModels.cxx @@ -1,4 +1,4 @@ -#include "GameServer/Definitions/Includes.hxx"" +#include "GameServer/Definitions/Includes.hxx" PDefWorldModel::PDefWorldModel() { @@ -28,7 +28,7 @@ bool PDefWorldModel::LoadFromDef(PTokenList *Tokens) case 5: // function value mFunctionValue = atoi(i->c_str()); break; - + case 6: // hack difficulty mHackDifficulty = atoi(i->c_str()); break; diff --git a/TinNS/Source/GameServer/GameCommands/T.cxx b/TinNS/Source/GameServer/GameCommands/T.cxx index 49b70f4..8c463a5 100644 --- a/TinNS/Source/GameServer/GameCommands/T.cxx +++ b/TinNS/Source/GameServer/GameCommands/T.cxx @@ -133,7 +133,7 @@ void PCommands::doCmd_dev_t() uint16_t nDur = 20; uint8_t nparam = 1; - nparam = GetArgInt( 2 ) && 0xff; + nparam = GetArgInt( 2 ) & 0xff; tmpMsg = new PMessage( 32 ); -- 2.15.1