- fixed fprint parameters
authorAkiko <akiko@linux-addicted.net>
Tue, 19 May 2015 09:57:32 +0000 (11:57 +0200)
committerAkiko <akiko@linux-addicted.net>
Tue, 19 May 2015 09:57:32 +0000 (11:57 +0200)
- fixed a boolean/bitwise operation
- fixed an include

TinNS/Source/Common/Message.cxx
TinNS/Source/GameServer/Definitions/WorldModels.cxx
TinNS/Source/GameServer/GameCommands/T.cxx

index cca2d3c..e3bb8ef 100644 (file)
@@ -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] : '.';
     }
index b57113d..68a3c7f 100644 (file)
@@ -1,4 +1,4 @@
-#include "GameServer/Definitions/Includes.hxx""\r
+#include "GameServer/Definitions/Includes.hxx"\r
 \r
 PDefWorldModel::PDefWorldModel()\r
 {\r
@@ -28,7 +28,7 @@ bool PDefWorldModel::LoadFromDef(PTokenList *Tokens)
 \r
             case 5: // function value\r
                 mFunctionValue = atoi(i->c_str()); break;\r
\r
+\r
             case 6: // hack difficulty\r
                 mHackDifficulty = atoi(i->c_str()); break;\r
 \r
index 49b70f4..8c463a5 100644 (file)
@@ -133,7 +133,7 @@ void PCommands::doCmd_dev_t()
       uint16_t nDur = 20;\r
       uint8_t nparam = 1;\r
 \r
-        nparam = GetArgInt( 2 ) && 0xff;\r
+        nparam = GetArgInt( 2 ) & 0xff;\r
 \r
         tmpMsg = new PMessage( 32 );\r
 \r